+1 vote
in Data Structures & Algorithms I by (88.2k points)
What is the time complexity for decreasing priority of key in a maximum ternary heap of n elements?

(a) O (log n/ log 3)

(b) O (3log n/ log 3)

(c) O (n)

(d) O (1)

This key question is from Ternary heap in section Heap of Data Structures & Algorithms I

This question was posed to me in examination.

1 Answer

+1 vote
by (672k points)
selected by
 
Best answer
Correct choice is (b) O (3log n/ log 3)

The explanation is: In order to decrease the priority of key in a maximum 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).

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.

Categories

...