This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var s = "ADOBZASQWECCCODEBANCNMKLNJNCBA"; | |
var substring = "ABC"; | |
Console.WriteLine(MinWindow(s, substring)); | |
string MinWindow(string s, string substring) | |
{ | |
var subsDictionary = new Dictionary<char, int>(); | |
var window = new Dictionary<char, int>(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int[,] canvas = new int[,] | |
{ | |
{1, 1, 1, 1, 1, 1, 1, 1}, | |
{1, 1, 1, 1, 1, 1, 0, 0}, | |
{1, 0, 0, 1, 1, 0, 1, 1}, | |
{1, 2, 2, 2, 2, 0, 1, 0}, | |
{1, 1, 1, 2, 2, 0, 1, 0}, | |
{1, 1, 1, 2, 2, 2, 2, 0}, | |
{1, 1, 1, 1, 1, 2, 1, 1}, | |
{1, 1, 1, 1, 1, 2, 2, 1} |