To find if two given Strings are Anagram of each other is very commonly asked interview Question.
Any word or phrase that exactly reproduces the letters in another order is an anagram.
for example "William Shakespeare " and "I am a weakish speller " are Anagrams.
In a perfect anagram, every letter must be used, with exactly the same number of occurrences as in the anagrammed word or phrase.
Below is my code of checking if two given strings are anagrams.
Any word or phrase that exactly reproduces the letters in another order is an anagram.
for example "William Shakespeare " and "I am a weakish speller " are Anagrams.
In a perfect anagram, every letter must be used, with exactly the same number of occurrences as in the anagrammed word or phrase.
Below is my code of checking if two given strings are anagrams.
No comments :
Post a Comment