What is the need for a circular queue?
Options
- A. easier computations
- B. effective usage of memory
- C. implement LIFO principle in queues
- D. to delete elements based on priority
B. effective usage of memory
In a linear queue, when elements are deleted from the front, the empty spaces cannot be reused.
This causes memory wastage.
A circular queue connects the last position to the first position, allowing reuse of empty spaces.
So it ensures:
Better space utilization
No unnecessary memory wastage
Attempt Quiz Now:
BPSC Tre 4.0 DSA Practice Set