MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In Queue Insertion & Deletion take place at ____
A
same end
B
first end
C
different end
D
last end
Explanation: 

Detailed explanation-1: -A queue is an ordered list in which all insertions take place at one end, the rear, while all deletions take place at the other end, the front.

Detailed explanation-2: -Double ended Queue: Double Ended Queue is also a Queue data structure in which the insertion and deletion operations are performed at both the ends (front and rear). That means, we can insert at both front and rear positions and can delete from both front and rear positions.

Detailed explanation-3: -The insertion in a linear queue must happen from the rear end and deletion from the front end. But, in deque, you can perform both insertion and deletion operations at both of its ends. That’s why it is called a Double-Ended Queue (Deque).

Detailed explanation-4: -In queue, insertion operation is known as Enqueue whereas deletion operation is known as Dequeue. Insertion and deletion operation in queue is known as enqueue and dequeue.

There is 1 question to complete.