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.
Invert the bits from index i to index j. If the given number is '1010' and it said
['I',2,4]
then you would 'flip' (change from 1 to 0 or vice versa) the bits from index 2 to 4 and get '1101' (indexes start at 1 and not 0 for some reason).Happened to me too.
@ Chrono79 No it isn't, I tried the sample tests and the code worked just fine, then I go to the final tests, and it says that you cannot read property length of array. I checked my spelling, it wasn't wrong. It doesn't happen in the sample tests, none of that gibberrish saying I was not allowed to pick the property length of array, which of course should be a valid property of an array. I even tried to include 'if (array.isArray())', which should have no problem with any type of data type, and still it said that cannot read isArray() of item array. Maybe it's a problem with browsers. Please actually fix this instead of blaming the problem on us.
Edit: if you wanted to blame the problem on me removing items from the array, I didn't remove any items from array.
What does this bit mean?
['I', i, j] : Which means invert the bit from i to j (inclusive).
This comment is hidden because it contains spoiler information about the solution
Same as above, check your code. The error message shows what the compiler finds wrong, but the problem is indeed in your code. I have just tested it and it worked for me.
It's a problem with your code, you have something (parentheses or curly braces) without closing it. Fix it.
This code produces a similar error message:
For Javascript
it says unexpected token ) at line 31: });
My code plus the testcode only had 29 lines. Please fix.
For some reason it refuses to test, it said Unexpected token }); (The token was the ')' ). I searched my whole code for 10 times, and there was no such thing as '});'. I even tried to alter the testing code, it didn't work. Pls fix this