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.
Sure, go ahead. I am not a proper sensei yet, I guess.
This comment is hidden because it contains spoiler information about the solution
It still seems to have an issue with random tests (in Ruby)
The checking code (as someone suggested already) is using the target twice. But the function is being feed with the correct start value.
Rand test 1
[[0, 4], [4, -6]]
wrong route from [4, -6] to [4, -6]
Expected: [[4, -6]],
instead got: [[0, 4], [1, 3], [2, 2], [3, 1], [4, 0], [4, -1], [4, -2], [4, -3], [4, -4], [4, -5], [4, -6]]
Rand test 2
[[1, -6], [4, 2]]
wrong route from [4, 2] to [4, 2]
Expected: [[4, 2]],
instead got: [[1, -6], [2, -5], [3, -4], [4, -3], [4, -2], [4, -1], [4, 0], [4, 1], [4, 2]]
Thank you for your input
Yes, it is indeed reversed. Embarrassing.