Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

OpenStack Trove

Authors: Amrith Kumar, Douglas Shelley

1st Edition

1484212215, 9781484212219

Students also viewed these Databases questions