Question bank › Queue
Dsa Queue Medium

Automated Ticketing System

Design an automated ticketing system for a concert where customers arrive at various times and each takes a certain amount of time to purchase a ticket. Compute the total ticket purchasing time for all customers. Input Format: - The first line contains an integer N (1 <= N <= 1000), the number of customers. - Each of the next N lines contains two integers: arrival_time and ticket_purchase_time. Output Format: - The total time taken for all customers to finish purchasing tickets. Example: Input: 4 0 5 1 3 3 2 4 7 Output: 13

Key concepts

queueticketingprocessing

Practise this out loud — free

Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.

🎙 Practise this question now
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.