GATE CS 2017 (Afternoon) — Question 13

Data StructuresAbstract Data Types (ADTs), Stacks, QueuesMCQ1 mark · −1/3 if wrongMedium

A circular queue has been implemented using a singly 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 operations 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.
  1. A
    I only
  2. B
    II only
  3. C
    Both I and II
  4. D
    Neither I nor II
Practise the full 2017-AN paper
Challenge a friend: WhatsApp Telegram
Recommended book · affiliate linkIntroduction to Algorithms (CLRS)The standard reference behind most GATE algorithm questions.
Practise more on Abstract Data Types (ADTs), Stacks, QueuesTimed, in the real exam interface · free to start

A GATE question every morning

One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.

Join
Stuck? Ask in the student group