• +91 9723535972
  • info@interviewmaterial.com

Data structure Interview Questions and Answers

Question - How can elements be inserted in the circular queue?

Answer -

There are two cases in which items can be placed in a circular queue. They are as follows:

  • When front != 0 and rear = max -1. This makes it possible as the queue will not be full, and new elements can be inserted here.
  • When rear != max -1. This ensures that the rear is incremented to the maximum allocation size, and values can be inserted easily to the rear end of the queue.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners