Question bank › Queue
Dsa Queue Easy

Emergency Services Response

In an emergency services system, different types of incidents have a priority level. Lower numbers indicate higher urgency. You are given a list of incident priorities. Determine the order in which the incidents will be attended to. Input Format: - The first line contains an integer N (1 ≤ N ≤ 1000), the number of incidents. - The next N lines each contain an integer P (1 ≤ P ≤ 10), the priority of each incident. Output Format: - Output the priorities in the order they will be handled, separated by spaces. Example: Input: 5 3 1 4 2 1 Output: 1 1 2 3 4

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