Gate2017 ss Q23

0. A circular queue has been implemented using a single linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively. Which of the following statements is/are CORRECT for such a circular queue, so that insertion and deletion operation can be performed in O (1) time?
I. Next pointer of front node points to the rear node.
II. Next pointer of rear node points to the front node.

  • Option : B
  • Explanation :
    Next pointer of the front node would point to the second node, if any.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *