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.
Ah, coercion. Thanks for pointing it out - I refactored it.
Care to explain your reasoning?
My function returns 1 for [-1, 1] - unless I'm missing something that is the correct answer.
The function will never return the first number. The first number starts the sequence, it can't be non-consecutive in that case. The second number should be 0 but it's -1 so that is the first non-consectuive number.