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.
Yes it's a pain having to highlight the text whenever I want to refer to the table instead of just being able to glance at it.
In the JS version, when submitting, there is an errornous expected result for the 2nd test case:
Test output:
Since thes starting position is 1 and there are no swaps, the expected result should be: 1
Looking at output of the submit-tests, it seems anytime an empty swaps array is passed in to the function, the test case is expecting the number that comes after the correct number.
Nice quick Kata but the JavaScript version requires the string "NaN" to be returned if a non-number input is given, but the instructions say to return an empty value.
Either the instructions need to be clarified to adhere to the kata test, or the test should be tweaked to adhere to the instructions.