Which of the following operations does not destroy the leftist heap property?

Category: QuestionsWhich of the following operations does not destroy the leftist heap property?
Editor">Editor Staff asked 4 weeks ago

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

1 Answers
Editor">Editor Staff answered 4 weeks ago

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.