Exclusive Event Entry

Problem Overview

  • Core task: compute each guest’s ID-check finish time at an exclusive event.
  • Input: array of arrival times (seconds from 0); Output: array of finish times, or arrival time if they leave.
  • Constraints: each check takes 300s; if >10 are waiting (not counting the one in service) the newcomer leaves; if arrival equals a finish time, queued guest is served first.
  • Context: real-world queue management for event entry.
  • From Ziprecruiter interviews; a coding interview problem and interview question.

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Input Variables
Execution Result: