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.
You're not meant to modify the original array. It's bad practise to modify it because it will change it permanently and you can't reverse the process. Here is an example (written in Python):
The Kata author has designed it in such a way that the array will be the parameter for the function of the expected results. This means that the modified array that you are returning will be the parameter instead of the original array. To curcumvate this problem you need to create another array and push it this one instead, or you can copy/duplicate the array within the function (but make sure you do it properly - don't just create a new variable equal to the original array).
why it doesn't work?
is there a way we can see the test values ?
This method doesn't work, I suggest sorting the given list and removing duplicates first.
This comment is hidden because it contains spoiler information about the solution