Circular queue
A queue implementation where the end wraps around to the beginning, reusing storage space. Circular queues avoid wasting space in linear queue implementations. Pointer management distinguishes empty from full queues. Circular queues are efficient for bounded-size queue applications.
Formula
rear = (rear + 1) MOD maxSize; front = (front + 1) MOD maxSize
Real World
A McDonald's drive-through uses a circular queue pattern — once a car leaves the pickup window, that slot in the lane becomes available for a new car joining at the order point, reusing limited physical space.
Exam Focus
Always show the MOD operation in trace tables; examiners award marks for demonstrating how pointers wrap around.
How well did you know this?