Write an algorithm of priority circular queue Deletion.

Priority circular queue Deletion:

  • In priority circular queue deletion first we check whether queue is empty. If the queue is empty we show “the queue is empty ” and return.
  • in second condition we check if the front and rear are on (0) index so we delete the value and shift front and rear on (-1)
  • If the front is on last point so we shift the front on (0) index because it,s a circular queue.
  • in last step if the front is anywhere so we delete the value using it,s priority.


P CQDeletion(Queue,N,F,R,P)
(1) [Start]
(2) [Check For Empty]
If F= -1 Then
Show “ Queue is Empty”
[End of If step 2]
(3) Delete Queue[P] [F]
(4) [Check Condition]
If R=F Then
F=R= -1
Else If F= N -1 Then
[End Of If Else step 4]

Leave a Reply

Your email address will not be published. Required fields are marked *