+1 vote
in Data Structures & Algorithms I by (110k points)
What is the ancestor of the leaf node in a given minimum ternary heap?

(a) 1

(b) 10

(c) 18

(d) 20

1 Answer

+1 vote
by (737k points)
selected by
Best answer
Correct choice is (a) 1

For explanation: Minimum ternary heap has the smallest element as its root node. The parent node is all either equal or less than children node in a minimum ternary heap. Ancestor is the node falling on the path from that node to the root node. So here ancestor of all leaf nodes is 1.

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.