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.
This comment is hidden because it contains spoiler information about the solution
I like this kata. But I think there is a problem with the random javascript test cases:
[ -2, 6, 0, 0, -4, 7, -3 ]
Expected: -1, instead got: 1
[ 8, 7, 2, 0, 6, -4, 7, 0, 6, 2, -2, 8 ]
Expected: -1, instead got: 2
[ 2, -3, -3, 0, 0, 4, 2, 8, 3, 7, -4, 9, 2, 6, 2 ]
Expected: -1, instead got: 2
None of them should result in -1. If I copy this test cases to my working Java solution, all of this tests pass as I would expect and not with -1.
Great, thanks!
This comment is hidden because it contains spoiler information about the solution
But this would not work with
null
values as suggested in the instructions, would it?