1.

What are the siblings of smallest element of the given maximum ternary heap?(a) 31(b) 12(c) 18(d) 22This intriguing question originated from Ternary Heap topic in portion Heap of Data Structures & Algorithms II had been asked this question in an online quiz.

Answer»

The correct answer is (c) 18

Explanation: MAXIMUM ternary heap has the HIGHEST element as its root node. The parent node is all EITHER EQUAL or greater than CHILDREN node in a maximum ternary heap. The smallest element in the maximum ternary heap is 10 and its siblings are 18, 20.



Discussion

No Comment Found

Related InterviewSolutions