You are viewing a single comment's thread. Return to all comments →
My answer is from same idea using Counter
from collections import Counter def number_needed(a, b): a = Counter(list(a)) b = Counter(list(b)) return len(list((a-b).elements())) + len(list((b-a).elements()))
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 answer is from same idea using Counter