When a circular queue is implemented in an array, then which of the following…

2018

When a circular queue is implemented in an array, then which of the following condition holds when there is only one element in the queue?

  1. A.

    Front = Rear = null

  2. B.

    Front = Rear ≠ null

  3. C.

    Front = Rear + 1

  4. D.

    Front = Rear − 1

Attempted by 1028 students.

Show answer & explanation

Correct answer: B

Explanation: When there is only one element in a circular queue implemented using an array, both Front and Rear refer to the same array index and are not null. Therefore, Front = Rear ≠ null. Key point: A single-element queue has Front and Rear pointing to the same position.

Explore the full course: Up Lt Grade Assistant Teacher 2025