You are viewing a single comment's thread. Return to all comments →
Thanks your code helped. Version without import.
def makingAnagrams(s1, s2): d = {c:s1.count(c) for c in set(s1)} for c in s2: d[c] = d.get(c, 0) - 1 return sum(map(abs, d.values()))
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 →
Thanks your code helped. Version without import.