What is the child of smallest element of the given minimum ternary heap?

Category: QuestionsWhat is the child of smallest element of the given minimum ternary heap?
Editor">Editor Staff asked 5 months ago

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

1 Answers
Editor">Editor Staff answered 5 months ago

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.


Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40701