Union of distinct episodes
Your task
Two listeners share a household account, and each has a play history: a list of podcast episode ids, with repeats whenever an episode was replayed. For a coverage report, count how many distinct episodes were played by at least one of the two listeners, the size of the union of their distinct episode sets. For example, histories ["e1", "e2"] and ["e2", "e3", "e3"] cover the episodes e1, e2 and e3, so the answer is 3. Two empty histories give 0. Return the count as an integer.
Examples
distinct_across(a: list[str], b: list[str]) -> intExample 1
Input
distinct_across(["e1", "e2"], ["e2", "e3", "e3"])Output
3