1.

Heap can be used as ________________(a) Priority queue(b) Stack(c) A decreasing order array(d) Normal ArrayThe question is from Heap in section Heap of Data Structures & Algorithms IThis question was addressed to me in final exam.

Answer»

Correct choice is (a) PRIORITY queue

For explanation: The property of heap that the VALUE of root MUST be either greater or less than both of its CHILDREN makes it WORK like a priority queue.



Discussion

No Comment Found

Related InterviewSolutions