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.
That's theory on complexity and if we follow, we should say that what you propose is O(n*m) where m is the number of letters a-z i.e. the size of your boolean array. Now, the log(n) part is less than that for even the largest possible memory of a single computer. And while I agree that m can be considered constant, the O(nlogn) solution will be faster in any practical application. That's theory. And when it comes to other things like readability, then, well the code speaks for itself :)