Suppose a circular queue of capacity \((n −1)\) elements is implemented with…
GATE · 2012 · CS · Computer Science & IT
Suppose a circular queue of capacity elements is implemented with an array of elements. Assume that the insertion and deletion operations are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect and are
- A.
: (REAR+1) mod n == FRONT: REAR == FRONT - B.
: (REAR+1) mod n == FRONT: (FRONT+1) mod n == REAR - C.
: REAR == FRONT: (REAR+1) mod n == FRONT - D.
: (FRONT+1) mod n == REAR: REAR == FRONT
Attempted by 866 students.
Sign up free to check your answer
Sign up freeLoading lesson…