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.
And in fact, it would have thrown an error with an even length too, since range needs integers (3.0 won't do).
Fixed.
So clean!
I believe this is modifying the incoming array of names. :(
Hi! In this kata you can write anything in the context, for example null, this, undefined, or anything else.
And it will work :)
description updated, please check if it's clearer.
thanks!
Edited the description test a bit, any feed is welcome :)
My bad >< Should study Python2 more.
In Python 2, both / and // perform floor division by default, so there is no error.
Could you tell us in which language and what was the input that created this problem? Also, consider that the sequences may be shuffled, so for example "4 3 1 5 2" returns 0.
JS people, what's the correct context to apply in this case? I saw results with
this
,func
, andnull
.If len(word) is odd, range function will return error. You should use range(len(word)//2).
Random tests aren't working properly. It's currently asking me to return 0 for an invalid sequence, which the instructions claim should only be returned for an unbroken sequence.
Instructions need to be more clear.