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'm also confused. So "NORTH" "WEST" "SOUTH" "EAST" is irreducible because it has no opposite AND consecutive directions, but not all the opposite directions in "NORTH", "SOUTH", "SOUTH", "EAST", "WEST", "NORTH", "WEST" are consectuive either--so why does this second example reduce to "WEST"?
Haha, thanks, now I know I'm not crazy, but I still get an error from the test cases for some reason.
I've copy and run your code, it works and passed all tests. So no problem ;-)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Oh sorry, I see now that I have no example test cases. These are the fixed tests:
Yeah, I believe it's the last fixed test case
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.
This comment is hidden because it contains spoiler information about the solution
@ArcaneIntegers
,Ok, thanks!
hi, thanks for the suggestion, I'll update it when im on my computer
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++){....}
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...