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.
I am having the same issue
EDIT: never mind, solved it, turns out I was reading for length before checking if the array is null or not. thanks to @Chrono79
What the description means is that if a player has reached the final tile, all subsequent calls should return "Game over!".
your code mutates the input
You should add
console.log(s)
at the beginning of your function to see the whole input.And that's not your only problem but the
*
quantifier is greedy...Closing the issue since it's a problem with your code, not a problem with the kata itself.
Please provide language (JavaScript?) and your code, cause it is difficult to give you any advice without info. Maybe you should check edge cases - empty string?