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
|
203 Discussions
|
Please Login in order to post a comment
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
Some of the test cases contain non-square grids
I thought this question was misleading. It said that we would tackle a square grid with n rows, where each row contains a string of length n, but one of the test cases had n=3 with four-letter strings.