anagram

Solutions on MaxInterview for anagram by the best coders in the world

showing results for - "anagram"
May
22 Feb 2016
1def isAnagram(A,B):
2  if sorted(A) == sorted(B):
3    print("Yes")
4  else:
5    print("No")
6isAnagram("earth","heart") #Output: Yes
7
8#Hope this helps:)
Nola
02 Sep 2019
1#take user input
2String1 = input('Enter the 1st string :')
3String2 = input('Enter the 2nd string :')
4#check if length matches
5if len(String1) != len(String2):
6    #if False
7    print('Strings are not anagram')
8else:
9    #sorted function sort string by characters
10    String1 = sorted(String1)
11    String2 = sorted(String2)
12    #check if now strings matches
13    if String1 == String2:
14        #if True
15        print('Strings are anagram')
16    else:
17         print('Strings are not anagram')
Maria
02 Feb 2019
1const anagram = (str1, str2) => {
2    return str1.toLowerCase().split('').sort().join('') === str2.toLowerCase().split('').sort().join('');
3};
4
5let test = anagram('Regallager', 'Lagerregal');
6console.log(test);
queries leading to this page
python anagramsanagram python codinganagram what is python anagram programanagram pyhtonmake anagram program in pythonwhat is anagramanagram meansdefinition of anagramanagram of anagramhow to do anagrams pythonanagram program in python using functionblanagrams and anagrams in pythonpython code for anagramanagram pythonwhat s an anagramwhats an anagramanagrams python 3whats anagramanagram in pythonanagram 27python code for anagram and special anagramanagrams definitionanagram definitionwe are anagramanagrams program in pythonanagram meainigmake anagram in pythonanagram pythoinmake anagrams pythonanagrams python functionis anagramanagram programpython find anagramsanagram definedefine anagramwhat is anagram in python 3fanagram 3fanagrams in pythonanagramwhat us anagramanagram code in pythonwhat is anagram in pythonwhat is an a anagramdef anagramfun with anagram pythonwhat is anagram 3fanagram exampleis anagram in pythonanagram in pythoanagrama wikianagram anagrams in python codeprogram for anagram in pythonanagram pyanagrams pythonanagram program in pythonanagram meaning in pythonanagram python is anagramwhat is a anagram 22anagram 22what 27s anagramwhat is an anagramanagrama pythonanagram using pythonanagrams python programis anagram pythonanagram program pythonanagram meaningimplement anagram pythonanagram in python algorithmanagram python 3an anagramanagram programmingpython anagramanagramma in pythonanagram python codeanagram porblem in pythonanagram oblneanagram function pythonanagram 27anagram algorithm pythonanagram of areuse of anagramis anagram pythonanagram function in pythonanagram