A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
A. Rear = MAX_SIZE – 1
B. Front = (rear + 1)mod MAX_SIZE
C. Front = rear + 1
D. Rear = front
Answer:A
A normal queue, if implemented using an array of size MAX_SIZE, gets full when?
A. Rear = MAX_SIZE – 1 B. Front = (rear + 1)mod MAX_SIZE C. Front = rear + 1 D. Rear = front
Explanation: When Rear = MAX_SIZE – 1, there will be no space left for the elements to be added to the queue. Thus queue becomes full.