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.
The expected and actual values in random tests are flipped.
It also passes the same object to reference solution and user solution, so user modifying input can influence the tests (if the above is adjusted).
The provided example beneath this sentence is not a valid example. The actual example is under the Notes section.
"Closest to top left corner" is not well-defined enough to unambiguously specify what is "first".
I finally started crafting a good solution to this after thinking about it for about 3 hours and then accidentally refreshed the page and lost all my work. End me.
Update: Alright I have something but I'm failing the random testcases for weird reasons. It's saying my answer is wrong but the provided answer has the left index higher than the right index, e.g.
[0, 9, 10, 89, 5194] should equal [27, 9, 10, 89, 5194.0]
[0, 0, 4, 34, 1159] should equal [12, 0, 4, 34, 1159.0]
[39, 0, 47, 15, 1916] should equal [84, 0, 47, 15, 1916.0]
Duplicate.