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
|
482 Discussions
|
Please Login in order to post a comment
One of the test cases are wrong, the N value isn't the number of elements on the list and the lenght of each string?
3
3
abc
lmp
qrt
3
mpxz
abcd
wlmf
4
abc
hjk
mpq
rtv
Yeah kinda annoying for them to say square grid which implies elements in input have the same length as the number of inputs.
Problem and tests are not consistent, the problem states square grids but the test have non square grids.
Scala Solution
I had to assume column length can differ from number of strings/rows/n;
int cols = grid[0].Length;