Login or Create an Account to view the mark scheme, comment, and add to a test
A circular queue implementation uses an array of length SIZE to hold queue items as well as two variables called REAR and FRONT to hold the current index positions of the rear (tail) and front (head) of the queue respectively. Enqueue and dequeue increment REAR and FRONT respectively. Select the conditional statement below which would, upon evaluating to True, identify that the queue only has one element remaining.
(a).
REAR + 1 = FRONT
(b).
REAR = (FRONT + 1) % SIZE
(c).
FRONT = (REAR + 1) % SIZE
(d).
FRONT = REAR

Multiple Choice1 MarkPremium
7 Uses20 Views1 Like