a and b are each sorted in non-decreasing order and may contain repeated values. Return a sorted list containing every value that appears in a or b, each exactly once.
Example 1
Input:
union_sorted([1, 2, 2, 4], [2, 3, 4, 5])
Output:
[1, 2, 3, 4, 5]
Example 2
Input:
union_sorted([], [1, 1])
Output:
[1]
0 <= len(a), len(b) <= 2 * 10**5No results yet
Run your code to check it against the examples, or submit to run every test.