Linear Queue Insertion:
- In linear queue insertion we insert the data in a sequence .
- In linear queue we insert the data from last point and the last index is called “Rear”.
- And we delete the data from the first point is called “Front”.
- If (Rear =N-1) then queue is full. Because N is total length of queue. And queue is start from 0 index.
- And if rear and front are (=-1) then front and rear shift on (0) index.
- And if the space is available in queue then we increment in Rear. And insert the value.
(2) [Check For Full]
If R=N-1 Then
Show “ Queue is Full”
Else If R= -1 Then’
[End Of If Else step 2]