IsIsogram() Order

I think in our situation ( planet) O(n) will do the job, since we have this word only it’s much faster to check the letter with each other and return the Duplicated letter or not, rather than sorting and checking after that.
I suggest (n log n) in a general case since we don’t know the word, so we need to dealt with every situation.

Privacy & Terms