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.
Also, there are method to copy the whole object.
And also, that's not actually an issue.
Sorting the array is a very inefficient way of solving the problem. Folks in the comments pointed out that sorting takes O(n log n) time. The better solution takes O(n) time.