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
This solution eats the last number at the end of the sorted array and instead repeats the first element after the sorted array.
Current PHP solution is wrong, which means the tests are also giving out false failures.
Test array:
array(7, 18, 7, 5, 14, 16, 15, 1, 9, 15, 0, 16, 10, 13, 2, 5, 10, 3, 5, 6)
__sol return array:
array(7, 0, 1, 5, 7, 9, 14, 15, 15, 16, 16, 16, 10, 13, 2, 5, 10, 3, 5, 6)
If you compare the two arrays then you will notice that the number 18 is completely missing from the returned array, instead 16 is repeated twice.
This makes it impossible to solve this kata with a correct PHP solution.