Computer Science Homework Help

Computer Science Homework Help. data structure

check the question below for the details please type each answer in word document and attach it thanks

Q1. You are given a complete binary tree with arbitrary values stored in an array. It is not a binary search tree and it is not a heap. Your job is to convert it into a heap. Write a program in rough C++ code below to convert it into a max heap. If you call a method within your program, you should also write the complete rough code of that method below your program.

Q2. Show how your program would work step by step using the following array of arbitrary values as a complete binary tree example.

20

30

15

34

45

8

Computer Science Homework Help

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"