13 August 2026
Merge the Guest Lists
Medium
Lists
Bring two sorted guest lists together, keeping each number only once.
You are given two lists of guest numbers, left and right. Each list is already in nondecreasing order. Return one new list containing every number from both lists in nondecreasing order. If a number appears more than once, include it only once in the returned list.
Constraints
Both input lists are already in nondecreasing order.Each list contains integers.0 <= len(left), len(right) <= 200.
Function signature
def merge_unique(left: list[int], right: list[int]) -> list[int]: