Question: 3 7 . 4 3 . Answer the following questions based on this tree: 3 7 . Write the complete binary tree as an array.

37.43. Answer the following questions based on this tree:
37. Write the complete binary tree as an array.
(a)1614121078965114
(b)1614121071148965
(c)1614108976512114
(d)8910657141141216
38. If the element 18 is added to the heap, what elements will it be swapped with to fix
the heap?
(a)11,12,16
(b)5,7,14,16
(c)11,12
(d)8,10,14
3
Name: 1 MULTIPLE CHOICE
39. If the heap is popped, which element will be removed and returned?
(a)16
(b)8
(c)5
(d)4
40. If the heap is popped, which swaps will happen to fix the heap?
(a)16->5,5->12->4
(b)16->14->10->9
(c)16->5,5->14->10->9
(d)16->12->11

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!