Home » JAVA Programming » Data Structures » Question
  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?
    1. rear=rear%(MAX_SIZE+1)
    2. rear=rear+(1%MAX_SIZE)
    3. rear=(rear+1)%MAX_SIZE
    4. rear=(rear%1)+MAX_SIZE
    5. None of these
Correct Option: C

The front and rear pointer od circular queue point to the first element.



Your comments will be displayed only after manual approval.