Question: Thanks 1. (10 points) Execute BUILD-MAX-HEAP on the following array: 12, 13, 6, 2, 4, 20, 16, 32] Show each step of the algorithm by
1. (10 points) Execute BUILD-MAX-HEAP on the following array: 12, 13, 6, 2, 4, 20, 16, 32] Show each step of the algorithm by drawing a the binary tree representing the array (and eventually the heap). 2. (10 points) Execute the PARTITION algorithm with the following array [20,3, 4, 12, 19,8,6,5,7] Show the resulting array and the return value
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
