+1 vote
in Data Structures & Algorithms I by (88.2k points)
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 I

The question was posed to me in exam.

1 Answer

+1 vote
by (672k points)
selected by
Best 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.

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.