You are viewing a single comment's thread. Return to all comments →
Using Python3 defaultdict
def makingAnagrams(s1, s2): d=defaultdict(int) for c in s1: d[c]+=1 for c in s2: d[c]-=1 return sum(abs(v) for k,v in d.items())
Seems like cookies are disabled on this browser, please enable them to open this website
Making Anagrams
You are viewing a single comment's thread. Return to all comments →
Using Python3 defaultdict