Question bank › Queue
Dsa Queue Warm-up

Food Order Queue

You are simulating a queue for a food ordering system. Customers place their orders, and they are served in the order they arrive. Each order has a unique order number and a description of the food. Write a program that reads the list of orders from input and outputs the order descriptions in the exact sequence they were received. Input format: - The first line contains an integer n (1 ≤ n ≤ 100) - the number of orders. - The next n lines each contain an order in the format "<order_number> <food_description>". Output format: - Print the food descriptions, one per line, in the order they were placed. Example: Input: 3 1 Burger 2 Pizza 3 Salad Output: Burger Pizza Salad

Key concepts

queuemanagement

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.