If The Size Of The Array Used To Implement A Circular Queue Is #788
If the size of the array used to implement a circular queue is MAX_SIZE. How rear moves to traverse inorder to insert an element in the queue?
This multiple choice question (MCQ) is related to the book/course gs gs128 Java. It can also be found in gs gs128 Java Util Collections Framework - Java Queue - Quiz No.1.
If the size of the array used to implement a circular queue is MAX_SIZE. How rear moves to traverse inorder to insert an element in the queue?
rear=(rear%1)+MAX_SIZE
rear=(rear+1)%MAX_SIZE
rear=rear+(1%MAX_SIZE)
rear=rear%(MAX_SIZE+1)