You are viewing a single comment's thread. Return to all comments →
Kotlin:
fun gridChallenge(grid: Array<String>): String { val sorted_grid = grid.map { it.toCharArray().sorted() } for (i in 0..<grid.first().length) { val col_list = sorted_grid.map { it.get(i) } if (col_list != col_list.sortedBy { it }) 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 →
Kotlin: