1.

What is the child of smallest element of the given minimum ternary heap?(a) 1(b) 10(c) 22(d) 24My query is from Ternary Heap in section Heap of Data Structures & Algorithms II had been asked this question in an online interview.

Answer»

The CORRECT choice is (B) 10

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. In the above minimum ternary heap, the smallest element is 1 and its children are 10, 18, 20.



Discussion

No Comment Found

Related InterviewSolutions