What is the ancestor of the leaf node in a given minimum ternary heap?

Category: QuestionsWhat is the ancestor of the leaf node in a given minimum ternary heap?
Editor">Editor Staff asked 2 months ago

What is the ancestor of the leaf node in a given minimum ternary heap?
 
(a) 1
 
(b) 10
 
(c) 18
 
(d) 20

1 Answers
Editor">Editor Staff answered 2 months ago

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.