Computer Science, asked by rustamsinha60, 3 months ago

(c) Write an algorithm to traverse the circular queue.​

Answers

Answered by shinymeenushinymeenu
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 Anonymous
25

Answer:

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