Circular Queue Insertion:
- In circular queue insertion 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 whether the queue is empty so we insert the value in first Index.
- In 3rd condition if Rear is in last index so we shift the rear on next index because it,s a circular queue.
- In next condition we check space is available in queue and we increment in Rear and insert the value.
(2) [Check For Full]
If F=0 AND R=N-1 OR R+1=F Then
Show “ Queue is Full”
Else If R= -1 Then’
Else If R= N -1 Then
[End Of If Else step 2]