Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This is not true. I just ran the tests on my reference solution a couple times and it completed in less than 2 seconds each time. I'm not sure why your code is not passing, but here's some info about the random tests -- there are 3 groups of random tests, each running 20 individual tests each. With each successive test group, the typical size of the grid tested increases. The 3rd group runs tests for sizes of up to 24 x 24.
It might be an optimization problem, or it might be something else.
EDIT: try doing a console.log of the last test that times out, copy that test case and try debugging by running your solution against that test case locally (on your machine). Look out for non-terminating while loops.
.
It's possible if initial 50 cases represent some data scenario, and 51st test case represents another scenario which is not handled well by your solution. Did you try to check if timing out test case can indeed be solved by your solution efficiently? Remember that in case of timeout, all your non-flushed logs can be lost, so make sure to flush all your prints explicitly.
For now I am going to close your issue as unconfirmed, feel free to reraise it if you can come up with more details about the error in the kata than just "my solution fails".