You are viewing a single comment's thread. Return to all comments →
C#
public static string gridChallenge(List grid) {
List<string> arrangedGrid = new List<string>(); foreach(string s in grid) { arrangedGrid.Add(new string(s.OrderBy(x=>x).ToArray())); } for(int row = 0; row < arrangedGrid.Count - 1; row++) { for (int column = 0; column < arrangedGrid[0].Count(); column++) { if(arrangedGrid[row][column] > arrangedGrid[row + 1][column]) { return "NO"; } } } return "YES"; }
Seems like cookies are disabled on this browser, please enable them to open this website
Grid Challenge
You are viewing a single comment's thread. Return to all comments →
C#
public static string gridChallenge(List grid) {