What is the advantage of a circular queue over a linear queue?

2019

What is the advantage of a circular queue over a linear queue?

  1. A.

    Easy implementation

  2. B.

    Fast access

  3. C.

    Efficient utilization of memory

  4. D.

    All of the above

Attempted by 105 students.

Show answer & explanation

Correct answer: C

A circular queue reuses freed positions at the front of the array after the rear wraps around. Therefore it uses memory more efficiently than a simple linear queue.

Explore the full course: Coding For Placement