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.
Moreover, the solution uses a lot of regex
match
calls for the same array items during the sorting. That is not efficient by its nature.This looks cool, but sorting takes O(n*log(n)) time, while we already have the exact place where it should be, so it should be possible to do the same in O(n) time
Very clever and elegant solution