Linear Queue Deletion:
- linear queue deletion operation we delete the data sequentially from the front side.
- 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.
(2) [Check For Empty]
If R= -1 Then
Show “ Queue is empty”
[End of if step 2]
(3) Delete Queue [F]
(4) [Check condition]
If R= F Then’
[End Of If Else step 4]