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.
I don't want to change the original array, so I made a clone of it. Just in case, as it could be in real life, when you can't change the arr which is given to you. I did it for my self. In this situation, it's not necassary.
And this is not clever solution :) I mean my algorithm.
What was the point oc cloning the original array. Could you not just have sorted it, and used it the way it is.