1.

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 = frontQuestion is taken from Queue Operations topic in division Abstract Data Types of Data Structures & Algorithms IThe question was posed to me in my homework.

Answer»

Correct ANSWER is (a) Rear = MAX_SIZE – 1

Easy explanation - When Rear = MAX_SIZE – 1, there will be no space LEFT for the elements to be added in QUEUE. Thus queue BECOMES full.



Discussion

No Comment Found

Related InterviewSolutions