A simple way to check this is to sort the characters in


Question: Two words are anagrams if they contain the same letters in the same frequency. For instance, stale and least are anagrams of each other. A simple way to check this is to sort the characters in each word; if you get the same answer (in the example, we get aelst), the words are anagrams of each other. Write a method that tests if two words are anagrams of each other.

Solution Preview :

Prepared by a verified Expert
Basic Computer Science: A simple way to check this is to sort the characters in
Reference No:- TGS02457798

Now Priced at $15 (50% Discount)

Recommended (96%)

Rated (4.8/5)