MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

DATA STRUCTURES

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
In linked list implementation of a queue, from where is the item deleted?
A
At the head of link list
B
At the centre position in the link list
C
At the tail of the link list
D
None of the mentioned
Explanation: 

Detailed explanation-1: -In linked list implementation of a queue, from where is the item deleted? Explanation: Since queue follows FIFO so new element deleted from first.

Detailed explanation-2: -Insertion is performed at the rear end, whereas deletion is performed at the front end of the queue. If front and rear both points to NULL, it signifies that the queue is empty. The two main operations performed on the linked queue are: Insertion.

Detailed explanation-3: -In a linked queue, each node of the queue consists of two parts i.e. data part and the link part. Each element of the queue points to its immediate next element in the memory. In the linked queue, there are two pointers maintained in the memory i.e. front pointer and rear pointer.

Detailed explanation-4: -Correct answer is C In push operation, if new nodes are inserted at the beginning of linked list, then in pop operation, nodes must be removed from end. In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be removed from the beginning.

There is 1 question to complete.