Circular Queue

Algorithm

Deletion of an element

  • STEP 1 START
  • STEP 2 Store the element to delete.
  • STEP 3 If front == -1 then Queue Underflow.
  • STEP 4 Element deleted from queue is cqueue_arr[front].
  • STEP 5 if (front==rear) then front= -1; rear= -1; else goto step 6.
  • STEP 6 if (front == MAX - 1) then front= 0 else goto step 7.
  • STEP 7 front = front + 1.
  • STEP 8 STOP
DS Deletion of an element

Program


Output