You are viewing a single comment's thread. Return to all comments →
That's why i am in love with python, cheers!
def number_needed(a, b): char_list = list(set(a + b)) inp1 = Counter(a) inp2 = Counter(b) count = 0 for each in char_list: count += abs(inp1[each] - inp2[each]) 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 →
That's why i am in love with python, cheers!