Vidyalelo
Data Structure · Q20

Heaps

Programming · Data Structure · question 20

Q20

What is the time complexity of decreasing a key value in a min-heap?

A.
O(1)
B.
O(log n)
Answer
C.
O(n)
D.
O(n log n)

Answer: Option B

Solution

Answer: Option B
No explanation is given for this question Let's Discuss on Board