Anagram deletion distance

Write codeMedium14 min

Your task

Given two lowercase strings a and b, return the minimum total number of character deletions, you may delete from either string, needed to make them anagrams of each other. For example, 'cde' and 'abc' need 4 deletions: remove 'd' and 'e' from the first, 'a' and 'b' from the second, leaving 'c' and 'c'.

Examples

anagram_deletions(a: str, b: str) -> int
Example 1
Inputanagram_deletions("cde", "abc")
Output4