1.

Which of the following operations does not destroy the leftist heap property?(a) insert(b) merge(c) delete(d) swapThe query is from Heap topic in portion Heap of Data Structures & Algorithms IThis question was addressed to me in class test.

Answer»

The correct ANSWER is (c) delete

Best EXPLANATION: Performing insert and merge operations on the right path COULD destroy the leftist HEAP property. It is extremely easy to restore that property.



Discussion

No Comment Found

Related InterviewSolutions