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.
Try the TDD approach:
Added sample tests
No worries. I just look to see if all the code in that box is greyed out. If so, there's no actual test cases. You can still put in your own, though; that's kind of the intended use.
There aren't any tests I've put into the "your test cases" section, so nothing will run there unless you put your own tests in there. Maybe there was just an issue with your tests?
Seems to run fine and pass everything for me. What do you mean by the "original test"?
It seems your code modifies the inputed array (
array
) :Your code works fine on
repl.it
because you test only 1 rotation (rotate(data, 2)
), add another rotation before yours . . . :Hope it helps! ;))