Dsa
Queue
Warm-up
Queue Length Checker
Write a program that maintains a queue of integers and allows the user to check the length of the queue after a series of enqueue operations. The program should read an integer for the number of enqueue operations and then that many integers to enqueue. Finally, it should output the current length of the queue.
Example:
Input:
4
9
8
7
6
Output:
4
Key concepts
queuecountingbasic operations
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