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.
Initial reaction is its more of a word problem then a coding problem.
That's how I found it to be too.
someone please tell me why test fail?
Time: 382ms Passed: 10 Failed: 100
should work for basic tests (5 Passed, 0 Failed)
should work for more fixed tests as well (5 Passed, 0 Failed)
should finally work for random tests
✘ Expected: 72, instead got: 61
✘ Expected: 90, instead got: 34
✘ Expected: 150, instead got: 94
✘ Expected: 79, instead got: 17
✘ Expected: 31, instead got: 8
✘ Expected: 96, instead got: 45
✘ Expected: 72, instead got: 53
✘ Expected: 157, instead got: 110
✘ ...
That's what I see too. I did something like var newArray = array.splice() so that the orginal array would not be mutated, and then did similar techniques on newArray.
"Hint: Do not modify the original array."
What? Array is an object and copying it to the new array just copy the link, so sorting a new array is modify original array. So what was meant in that hint?
To pass the tests, zero has to be considered a positive integer. Seems wrong
haha