We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
defmakeAnagram(a,b):# Write your code herea_counts=Counter(a)b_counts=Counter(b)char_set=set(a+b)deletions=0forcharinchar_set:deletions+=abs(a_counts.get(char,0)-b_counts.get(char,0))returndeletions
Cookie support is required to access HackerRank
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 →