5 ms·
Your method doesn't account for the following case: are_anagrams("moo", "mom") Each letter in "moo" appears in "mom", and the length is the same, but the word
by NLips 11y ago
Your method doesn't account for the following case:
are_anagrams("moo", "mom")
Each letter in "moo" appears in "mom", and the length is the same, but the words are not anagrams of each other.
- fallat 11y agoHaha, nice catch. So there appears to be really only two solutions to the problem.