+1 vote
in Data Structures & Algorithms I by (88.2k points)
How many comparisons will occur while performing a delete-min operation?

(a) d

(b) d-1

(c) d+1

(d) 1

Question is taken from Heap in chapter Heap of Data Structures & Algorithms I

The question was posed to me in quiz.

1 Answer

+1 vote
by (672k points)
selected by
Best answer
Right choice is (b) d-1

Easy explanation - Since, the delete-min operation is more expensive and the heap is shallow, the minimum of d elements can be found using d-1 comparisons.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.