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?
(a) rear=(rear%1)+MAX_SIZE
(b) rear=(rear+1)%MAX_SIZE
(c) rear=rear+(1%MAX_SIZE)
(d) rear=rear%(MAX_SIZE+1)
I got this question during an online exam.
I would like to ask this question from Data Structures-Queue topic in section java.util – The Collections Framework of Java