O(n log n) solution

On my own I would have guessed that O(n log n) is the best you can get. I don’t see how you could get O(n) speed with isogram check happening with O(n) speed and the sorting left to do and till the challenge it was revealed that O(n log n) speed is deffinitely aproachable.

Yes, I’ve spoiled myself the fun and I’ve read other posts about that it’s possible to do it with O(n) speed.

Privacy & Terms