A circularly linked list is used to represent a Queue. A single variable p is…

GATE · 2004 · CS

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?

circularLinkedList

  1. A.

    rear node

  2. B.

    front node

  3. C.

    not possible with a single pointer

  4. D.

    node next to front

Attempted by 880 students.

Show answer

Correct answer: A

The worked solution is available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…