1.

Time taken in decreasing the node value in a binomial heap is(a) O(n)(b) O(1)(c) O(logn)(d) O(nlogn)I'm obligated to ask this question of Binomial and Fibonacci Heap in portion Heap of Data Structures & Algorithms IThe question was posed to me in exam.

Answer»

Correct option is (c) O(LOGN)

Explanation: Decreasing a node value may result in VIOLATING the min property. As a result be there would be exchange in the value of PARENT and child which at max goes up to HEIGHT of the HEAP.



Discussion

No Comment Found

Related InterviewSolutions