MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Which data structure allows deleting data elements from front and inserting from rear?
A
Stack
B
Queue
C
Array
D
Linked List
Explanation: 

Detailed explanation-1: -It is a FIFO (First In First Out) data structure, which means that we can insert an item to the rear end of the queue and remove from the front of the queue only.

Detailed explanation-2: -A dequeue in data structure is a linear data structure that does not follow the FIFO rule (First in first out), that is, in a dequeue data structure, the data can be inserted and deleted from both front and rear ends.

Detailed explanation-3: -Dequeue is a data structure in which we can add and remove items from both the front and rear ends.

There is 1 question to complete.