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.
Where Typescript?
The original array has been sorted. I don't think this is what we wanted.
thanks to explain complexity
This solution is "brute force".
it has a time complexity of O(n log n)
https://stackoverflow.com/questions/57763205/what-is-array-prototype-sort-time-complexity
I solved this kata with O(n), I was surprised to find this one as most upvoted solution.
I was looking for even better solutions than mine.
Not working with string containing "?"