GATE | GATE-CS-2004 | Question 36

A circularly linked list is used to represent a Queue. A single variable p is used to access the Queue. To which node should p point such that both the operations enQueue and deQueue can be performed in constant time?

(A) rear node
(B) front node
(C) not possible with a single pointer
(D) node next to front

Answer: (A)

Explanation: See

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.