Answer: PROCEDURE DELETE(QUEUE, F, R, item)
[Deletes ‘item’ from the ‘stack’, ‘F’ is the Front end pointer and ‘R’ is the rare end pointer]
1. [Underflow ?]
if (R <= 0)
write Stack is empty.
return.
2. [Deleting Element]
item <-- QUEUE[F]
3. [Incrementing F]
F <-- F + 1
4. [Checking for empty queue]
if (F > R)
then F <-- R <-- 0
return.