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.
As I understand the rules, this test:
Testing for [0, 0, 0, 3, 0, 4, 2, 0]
should produce result:
[0, 0, 3, 4, 2, 0]
because arr[1] should collapsing with arr[0],
arr[4] -> arr[2]
and arr[7] stay at his place
But expected result was: [0,3,4,2,0]
How is that?