Consider a standard Circular Queue ‘q’ implementation (which has the same condition for Queue Full and Queue Empty) whose size is 11 and the elements of the queue are q, q, q…..,q.
The front and rear pointers are initialized to point at q . In which position will the ninth element be added?
Explanation: Circular queue whose total size is 11, front and rear pointers are initialized to point at q:
Therefore, 9th element will be added at pointer q.
So, option (A) is correct.
Quiz of this Question
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.