You are viewing a single comment's thread. Return to all comments →
It appears to me my python solution is much better then the one posted in editorial:
from collections import Counter def number_needed(a, b): ct_a = Counter(a) ct_b = Counter(b) ct_a.subtract(ct_b) return sum(abs(i) for i in ct_a.values())
Cons?
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 →
It appears to me my python solution is much better then the one posted in editorial:
Cons?