Complete the sentence to define a circular queue.
A circular queue connects the last position back to the [1] position.The circular queue connects the last position back to the first position to reuse empty spaces.
Complete the sentence about the main advantage of a circular queue.
A circular queue efficiently uses memory by reusing [1] positions after they are freed.The circular queue reuses empty positions to avoid wasting memory space.
Fix the error in the statement about circular queue pointers.
In a circular queue, the [1] pointer moves forward and wraps around to the start when it reaches the end.
The rear pointer moves forward to add new elements and wraps around in a circular queue.
Fill both blanks to complete the condition that checks if a circular queue is full.
The queue is full if (rear + 1) [1] size and front [2] rear.
The queue is full when (rear + 1) mod size equals front, meaning the next position is the front.
Fill all three blanks to complete the formula for the number of elements in a circular queue.
count = (rear - front + [1]) [2] size [3] 1
The number of elements is calculated by adding size to (rear - front), then taking modulo % size, and finally subtracting - 1.