start to end (inclusive), but some are missing from the received list. Write missing_invoices(start, end, received) returning a sorted list of the missing IDs.missing_invoices(1, 5, [1, 2, 5])
[3, 4]
IDs 3 and 4 never arrived.
Build the full expected set with range().
Set difference, then sorted().