You are viewing a single comment's thread. Return to all comments →
My Python solution:
def number_needed(a, b): count = 0 for i in range(97, 123): ia = sum(letter == chr(i) for letter in a) ib = sum(letter == chr(i) for letter in b) count += abs(ia-ib) return count
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 →
My Python solution: