Advertisements
Advertisements
Question
Write an algorithm to implement insertion operation of queue.
Very Short Answer
Advertisements
Solution
- Start.
- If both
frontandrearare -1, increment both by 1; otherwise incrementrearby 1. - Store the new element at
queue[rear]. - Print
Item Inserted. - Stop.
shaalaa.com
Is there an error in this question or solution?
