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.
your solution has a bug that incorrectly handles four zeros in sequence
example input data [9, 0, 0, 0, 0, 0, 9]
your code will return [ 9, 0, 9, 0, 0, 0, 0, 0 ]
Hi I checked
your code gives wrong result for
this sequence [9, 0, 0, 0, 9, 1, 2, 0,
1, 0, 1, 0, 3, 0, 0, 1,
9, 0, 0, 0, 0, 0, 0, 9] can you check locally
javascript kata tests output incorrectly expected results and obtained results from the user
you shouldn't post code like that; anyone can see it.
I added the spoiler flag to your comment
This comment is hidden because it contains spoiler information about the solution