Dsa
Queue
Medium
Call Center Query Handling
In a call center, each incoming query has a timestamp and takes a certain time to handle. You need to calculate the total time taken to handle all queries in order of arrival. Queries are handled in FIFO order.
Input Format:
- The first line contains an integer N (1 <= N <= 1000), the number of queries.
- The next N lines contain an integer timestamp and an integer handling_time.
Output Format:
- A single integer representing the total time taken to handle all queries.
Example:
Input:
4
0 2
1 3
2 2
3 1
Output:
8
Key concepts
queuequeryhandling
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