4 - Linear Queue and Circular Queue
4 - Linear Queue and Circular Queue
4 - Linear Queue and Circular Queue
1. If REAR = N
Then Print OVERFLOW
2. Set REAR=REAR+1
3. Set QUEUE[REAR]=ITEM
4. If FRONT= 0 //queue is initially empty
Then Set FRONT=1