(c) Write an algorithm to traverse the circular queue.
Answers
Answered by
0
Answer:
Algorithm for insertion in circular queue
The steps of enqueue operation are given below:
First, we will check whether the Queue is full or not.
Initially the front and rear are set to -1. When we insert the first element in a Queue, front and rear both are set to 0.
When we insert a new element, the rear gets incremented, i.e., rear=rear+1.
Answered by
25
Answer:
The steps of enqueue operation are given below:
- The steps of enqueue operation are given below:First, we will check whether the Queue is full or not.
- Initially the front and rear are set to -1. When we insert the first element in a Queue, front and rear both are set to 0.
- When we insert a new element, the rear gets incremented, i.e., rear=rear+1.
Similar questions