Saved Bookmarks
| 1. |
Write an algorithm to implement insertion operation of queue. |
|
Answer» 1. Start 2. Check FRONT and REAR value, (i). if both the values are -1, then FRONT and REAR are incremented by 1 (ii). otherwise, Rear is incremented by one. 3. queue [Rear]=new element. 4. Stop |
|