6. Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array...


6. Suppose a circular queue of capacity (n – 1)<br>elements is implemented with an array of n<br>elements. Assume that the insertion and<br>deletion operation are carried out using<br>REAR and FRONT as array index variables,<br>respectively. Initially, REAR = FRONT = 0.<br>The conditions to detect queue full and<br>queue empty are:<br>Full: (REAR+1) mod n ==<br>empty: (FRONT+1) mod n == REAR<br>FRONT,<br>Full: (REAR+1) mod n == FRONT,<br>empty: REAR == FRONT<br>Full: (FRONT+1) mod n == REAR,<br>empty: REAR == FRONT<br>Full: REAR == FRONT, empty:<br>(REAR+1) mod n == FRONT<br>

Extracted text: 6. Suppose a circular queue of capacity (n – 1) elements is implemented with an array of n elements. Assume that the insertion and deletion operation are carried out using REAR and FRONT as array index variables, respectively. Initially, REAR = FRONT = 0. The conditions to detect queue full and queue empty are: Full: (REAR+1) mod n == empty: (FRONT+1) mod n == REAR FRONT, Full: (REAR+1) mod n == FRONT, empty: REAR == FRONT Full: (FRONT+1) mod n == REAR, empty: REAR == FRONT Full: REAR == FRONT, empty: (REAR+1) mod n == FRONT

Jun 11, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here