1.

What is the height of a given minimum ternary heap?(a) 1(b) 10(c) 2(d) 24The question is from Ternary Heap in portion Heap of Data Structures & Algorithms II have been asked this question in a national level competition.

Answer»

Right option is (a) 1

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. Height is the TOTAL length from the root node to the leaf node. So the height of the minimum ternary heap is 1.



Discussion

No Comment Found

Related InterviewSolutions