Two words are anagrams if one of them has exactly same characters as that of the another word.
Example : Anagram & Nagaram are anagrams
Anagram
Nagaram
First check if the length of the strings are the same. then check if the sum of the characters in both the strings are same (ie the ascii code sum) then the words are anagrams else not an anagram