Question bank › Queue
Dsa Queue Medium

Call Center System

In a call center, callers are assigned an agent based on their severity level. The system must process calls in such a way that urgent calls are answered before regular calls. Each call has a unique ID and a severity level (1 for urgent, 2 for regular). Write a program that determines the order in which calls are answered. Input consists of an integer N (number of calls), followed by N lines with call ID and severity level. Output the order of call IDs as they are attended to. Example Input: 4 C1 1 C2 2 C3 2 C4 1 Example Output: C1 C4 C2 C3

Key concepts

queuepriority

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.