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 the queue as full.
(a).
REAR = (FRONT + 1) % SIZE
(b).
FRONT = (REAR + 1) % SIZE
(c).
REAR + 1 = FRONT % SIZE
(d).
FRONT + 1 = REAR % SIZE
Multiple Choice1 MarkPremium
28 Uses41 Views2 Likes