Question bank › Queue
Dsa Queue Easy

Order Processing Queue

A warehouse processes orders in a first-in-first-out (FIFO) manner. Each order arrives at a specific time and takes a known amount of time to process. Your program should read multiple lines of input, with each line containing two integers: the order arrival time and the processing time. The program ends when EOF is reached. Calculate and print the finish time for each order on a new line. Example Input: 0 4 2 3 5 2 Example Output: 4 7 9

Key concepts

queuefifosimulation

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.