You are viewing a single comment's thread. Return to all comments →
My Python solution:
def anagram(s): if len(s)%2 != 0: return -1 else: split = len(s)//2 s1 = s[:split] s2 = s[split:] for i in s1: if i in s2: s1 = s1.replace(i,'',1) s2 = s2.replace(i,'',1) return len(s1)
Seems like cookies are disabled on this browser, please enable them to open this website
Anagram
You are viewing a single comment's thread. Return to all comments →
My Python solution: