Question bank › Queue
Dsa Queue Easy

Customer Service Desk Queue

You are simulating a customer service desk in a store. Customers arrive at random intervals, and each spends a random amount of time being served. Implement a program that reads a list of arrival and service times, and prints the total time spent being served for all customers. The input consists of multiple lines, each with an integer representing the arrival time and another integer representing the service time. The input ends when you reach the end of file (EOF). Each output should be printed on a new line with the total time. Example Input: 0 3 1 9 5 6 Example Output: 9

Key concepts

queuesimulationdata structure

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 Praxari's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.