Question

When implementing a circular queue using an array in C, what is the primary advantage over a linear array-based queue?

A Simpler implementation logic.
B Eliminates the need for front and rear pointers.
C Prevents memory fragmentation.
D Efficiently reuses array space after dequeues, avoiding frequent shifts.
E Provides O(log N) access time for elements.
Practice Next

Hey! Ask a query