Write an algorithm of priority linear queue Deletion.

Priority Linear Queue Deletion:

  • In priority linear queue deletion operation we delete the data sequentially from the front side using it,s priority.
  • In linear queue deletion first we check whether the queue is empty.
  • If the queue is (-1) then we  print “Queue is empty”.
  • In second condition we check if Rear and front are equal. It means data is available on first index so we delete the first index and shift the Front and Rear on (-1) .
  • In 3rd condition we simply shift the front in next index and delete the value using it,s priority.


(1) [Start]
(2) [Check For Empty]
If R= -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
[End Of If Else step 4]
(5) [Return]

Leave a Reply

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