Subtopic 5.2
Circular Queue
4lessons22 min0done
A circular queue fixes the wasted cells of a linear queue. When an index reaches the end of the array it goes back to 0 with % CAPACITY, so cells freed at the front are used again.
The subtopic explains the wrap-around idea, shows enqueue and dequeue one at a time and ends with the point exams ask about most: when front and rear meet, is the queue full or empty?