In an empty queue, the values of 'front' and 'rear' pointers are ______.

2023

In an empty queue, the values of 'front' and 'rear' pointers are ______.

  1. A.

    0

  2. B.

    -1

  3. C.

    1

  4. D.

    Null

Attempted by 471 students.

Show answer & explanation

Correct answer: B

In most traditional implementations, in an empty queue the 'front' and 'rear' pointers are set to -1.

Explore the full course: Cocubes Preparation