Skip to main content
Chapter 4 of 13
NCERT Solutions

Queue — NCERT Solutions

Nagaland Board · Class 12 · Computer Science

NCERT Solutions for Queue, Nagaland Board Class 12 Computer Science: 14 textbook questions solved step by step. Covers EXERCISE — Chapter 4: Queue.

43 questions68 flashcards10 formulas & key relations5 concepts

Interactive on Super Tutor

Studying Queue? Get the full interactive chapter.

Quizzes, flashcards, AI doubt-solver and a step-by-step study plan — built for NCERT solutions and more.

Free trial, no card needed.

An illustration demonstrating the First-In, First-Out (FIFO) principle of a queue using a real-world analogy like people in a line. It should clearly show elements entering at one end (rear) and leavi
Super Tutor

Learn better with visuals Super Tutor pairs illustrations like this with notes and quizzes for Queue.

14 Questions Solved · 1 Section

The first 7 solutions are open to read. The other 7 are free with a Super Tutor account.

EXERCISE — Chapter 4: Queue

1aFill in the blank: _______________ is a linear list of elements in which insertion and deletion takes place from different ends.Show solution

Answer: Queue

Explanation: A Queue is a linear data structure in which insertion takes place at one end (called the Rear) and deletion takes place at the other end (called the Front). Because insertion and deletion happen at different ends, it follows the FIFO (First In First Out) principle.

1bFill in the blank: Operations on a queue are performed in _______________ order.Show solution

Answer: FIFO (First In First Out)

Explanation: In a queue, the element that is inserted first is the one that gets deleted first. This ordering is called FIFO — First In, First Out. For example, if A, B, C are inserted in that order, A will be the first one to be deleted.

1cFill in the blank: Insertion operation in a queue is called _______________ and deletion operation in a queue is called _______________.Show solution

Answer: Insertion operation → enqueue; Deletion operation → dequeue

Explanation:

  • enqueue: adds a new element at the Rear end of the queue.
  • dequeue: removes an element from the Front end of the queue.
1dFill in the blank: Deletion of elements is performed from _______________ end of the queue.Show solution

Answer: Front

Explanation: In a queue, following the FIFO strategy, deletion (dequeue operation) always happens from the Front end, while insertion (enqueue) happens at the Rear end.

1eFill in the blank: Elements 'A', 'S', 'D' and 'F' are present in the queue, and they are deleted one at a time, _______________ is the sequence of element received.Show solution

Answer: A, S, D, F

Explanation: A queue follows FIFO order. The elements are present as:
Front→A,S,D,F←Rear\text{Front} \rightarrow A, S, D, F \leftarrow \text{Rear}
When deleted one at a time from the Front, the sequence received is: A → S → D → F.

1fFill in the blank: _______________ is a data structure where elements can be added or removed at either end, but not in the middle.Show solution

Answer: Deque (Double-Ended Queue)

Explanation: A Deque (Double-Ended Queue) allows insertion and deletion at both the Front and the Rear ends. However, no insertion or deletion is allowed in the middle. It is a generalised version of both stack and queue.

1gFill in the blank: A deque contains 'z', 'x', 'c', 'v' and 'b'. Elements received after deletion are 'z', 'b', 'v', 'x' and 'c'. _______________ is the sequence of deletion operation performed on deque.Show solution

Answer: deletionFront, deletionRear, deletionRear, deletionRear, deletionFront

Explanation:

Initial deque (Front → Rear): z,x,c,v,bz, x, c, v, b

StepOperationElement RemovedDeque Status
1deletionFront()zx, c, v, b
2deletionRear()bx, c, v
3deletionRear()vx, c
4deletionRear()xc
5deletionFront()c(empty)

Sequence of operations: deletionFront, deletionRear, deletionRear, deletionRear, deletionFront

2Compare and contrast queue with stack.

Free with a Super Tutor account

3How does FIFO describe queue?

Free with a Super Tutor account

4Write a menu driven python program using queue, to implement movement of shuttlecock in its box.

Free with a Super Tutor account

5How is queue data type different from deque data type?

Free with a Super Tutor account

6Show the status of queue after each operation: enqueue(34), enqueue(54), dequeue(), enqueue(12), dequeue(), enqueue(), dequeue(), dequeue(), enqueue(1)

Free with a Super Tutor account

7Show the status of deque after each operation: peek(), insertFront(12), insertRear(67), deletionFront(), insertRear(43), deletionRear(), deletionFront(), deletionRear()

Free with a Super Tutor account

8Write a python program to check whether the given string is palindrome or not, using deque.

Free with a Super Tutor account

7 more solved questions in Queue

They are free with a Super Tutor account, along with practice quizzes and flashcards for this chapter. Free to start, no card needed.

Frequently Asked Questions

What are the important topics in Queue for Nagaland Board Class 12 Computer Science?
Key topics in Queue include Core Idea of Queue, Operations on Queue, Queue Implementation in Python, Deque and Its Operations. Study these first, then practise questions on each for the Nagaland Board Class 12 board exam.
Are these NCERT Solutions for Queue free?
The first 7 of the 14 solutions on this page are open to read. The other 7 are free with a Super Tutor account — signing up is free and needs no card.
How should I revise Queue for the Nagaland Board Class 12 board exam?
Learn the core ideas first, then work through the 43 practice questions on Queue. Revise definitions regularly and use flashcards for quick recall before the exam.

Sources & Official References

Content is aligned to the official syllabus. Refer to the board website for the latest curriculum.

For serious students

Get the full Queue chapter — start free.

Quizzes, flashcards, an AI doubt solver and a study plan for Nagaland Board Class 12 Computer Science. Free to start, no card needed.