Google News
logo
Data Structures - Quiz(MCQ)
Which of the following option is true if implementation of Queue is from the linked list?
A)
In enqueue operation, new nodes are inserted from the beginning and in dequeue operation, nodes are removed from the end.
B)
In enqueue operation, new nodes are inserted from the end and in dequeue operation, nodes are deleted from the beginning.
C)
Both (A) and (B)
D)
In enqueue operation, new nodes are inserted from the end and in dequeue operation, nodes are deleted from the end.

Correct Answer :   Both (A) and (B)


Explanation : As we know that Queue has two ends, i.e., one for the insertion and another one for the deletion. If Queue is implemented using Linked list then it can be done in either of the ways.

Advertisement