allocate(capacity, requests) processing booking requests (name strings) in order: the first capacity get 'confirmed', the rest get 'WL-1', 'WL-2', … Return a dict name → status. Names are unique.allocate(2, ['ana', 'raj', 'kim', 'zoe'])
{'ana': 'confirmed', 'raj': 'confirmed', 'kim': 'WL-1', 'zoe': 'WL-2'}Two seats, then a numbered waitlist.
enumerate gives the position.
Position minus capacity numbers the waitlist.