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.
⬆️ this.comment
This comment is hidden because it contains spoiler information about the solution
I want to know how I can identify the best-practice solution, as you mentioned. How can I determine that sorting is not a suitable approach in this situation?
This is actually not the best way of solving this problem. The instructions say to consider there being a large number of inputs. In terms of Big O, if you submitted this solution for production code, you'd have a LOT of people mad at you.
that would have been me if mine actually worked.
Yes, the space is on purpose, and no, the reason your code fails it's because it returns a wrong result.
Why are you adding
ay
and repeating the!
there?