1.

How many comparisons will occur while performing a delete-min operation?(a) d(b) d-1(c) d+1(d) 1Question is taken from Heap in chapter Heap of Data Structures & Algorithms IThe question was posed to me in quiz.

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.



Discussion

No Comment Found

Related InterviewSolutions