← back to unit
Medium
# puzzle gauntlet medium
The Double Invitation
Guests 1 through n each got one invitation — but the printer glitched and one guest got TWO. The RSVP list has n+1 entries. 🖨️
You get n and the RSVP list. Print the double-invited guest.
Example:
Input: n = 5, nums = [3, 1, 4, 5, 2, 4]
Output: 4
Walking the list with a seen-set, 4 is the first value already seen — the double-invited guest.
💡 need a hint?
pg-double-invitation.py🔒 given lines are locked — write your code in between
loading...