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.
A boolean should be returned instead of a string.
I've copy and run your code, it works and passed all tests. So no problem ;-)
Oh sorry, I see now that I have no example test cases. These are the fixed tests:
Hi
Are you talking about the last fixed test case? There are 30 random test cases too, so I'm not entirely sure which one you are referring to.
Hi, the reason you're getting this problem is that you forgot to declare the "i" you are using in the for loop as a variable. As a result, the "i" is now a global variable, and each time you call flatten, "i" gets reset to 0.
always use for(var i = 0;i < x.length;i++){....}
I tried your code, but it works perfectly.What's wrong?
Unshift is an expensive operation. Look at another way of reversing an array that doesnt use o(n) operations per iteration.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
make sure to return an Integer.
Could you post your code so I can have a look please? Just mark is as spoiler.
Which language are you using?