You are viewing a single comment's thread. Return to all comments →
from collections import Counter def number_needed(a, b): ca = Counter(a) cb = Counter(b) d1 = cb - ca d2 = ca - cb return sum(d1.values()) + sum(d2.values())
Seems like cookies are disabled on this browser, please enable them to open this website
Strings: Making Anagrams
You are viewing a single comment's thread. Return to all comments →