We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Grid Challenge
- Discussions
Grid Challenge
Grid Challenge
Sort by
recency
|
205 Discussions
|
Please Login in order to post a comment
C#
public static string gridChallenge(List grid) {
Java
There is no way to run out of O(n²) because of the column's checking, but follow a O(n) way to sort each row's string,
The question says that the grid will be square, yet some of the test cases (at least Test Case 1) have nonsquare grids. This is easy enough to resolve in the code, but the question wording is misleading.
Here is one way to do it in javaScript