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.
That doesn't solve the problem, you want the path to start and end at the same point, what you're doing would return true for a path like this:
['n','n','n','n','n','n','n','n','n','n']
where you can easily see you end at ten blocks from where you started.I am a bit confused. I split the array into 2 - one with the first 5 directions and the other with the last five. Then I reversed the array for the first five and compared it with the last five - "to return to the same direction". I am getting an error on the last test case (should return true if walk is valid). Why is this?