You are viewing a single comment's thread. Return to all comments →
Simple Scala Sol'n:
def gridChallenge(g: Array[String]): String = { (0 until g.size).foreach{i=>g(i)=g(i).sorted.toString} if ((0 until g(0).size).forall { i => (1 until g.size).forall { j => g(j)(i) >= g(j-1)(i) } }) "YES" else "NO" } }
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 →
Simple Scala Sol'n: