What is the time complexity for increasing priority of key in a minimum ternary heap of n elements?

What is the time complexity for increasing priority of key in a minimum ternary heap of n elements?
A. O (log n/ log 3)
B. O (3log n/ log 3)
C. O (n)
D. O (1)
 
Answer: b
Explanation: In order to the increasing the priority of key in a minimum ternary heap data structure having n elements, it performs downward swapping. So the time complexity for worst case is found to be O (3log n/ log 3).
 

Tìm kiếm

Back
Top