Your question is Anagram Difference Detection. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Guidewire ClaimCenter may need to compare two case-sensitive text values where character order is irrelevant. Given two strings, calculate the minimum total number of character deletions required to make them anagrams of each other.
A deletion can remove any one character from either string. Return the total number of deletions needed after retaining the largest possible set of matching character frequencies.
Implement anagram_difference(s1, s2), which accepts two strings and returns an integer. Characters are lowercase English letters from a through z; repeated characters count separately. The strings do not need to have the same length.
def anagram_difference(s1, s2):