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.
Cases similar to
[1,0,1,0,-1,0,-1]
are rarely generated in random cases, allowing this kind of incorrect solutions to pass:I don't open an extra issue, but NodeJS version should be updated to 14.0 and the new framework with mocha should be used.
The case if the input contains NaN you should return -1 is just a sort of input validation that distracts from the task, doesn't make much sense and makes it hard to implement in some other languages. It should be removed.