You are viewing a single comment's thread. Return to all comments →
from collections import Counter def anagram(s): if len(s) % 2 != 0: return -1 return sum( (Counter(s[:len(s)//2]) - Counter(s[len(s)//2:])).values() )
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 →