Question: 3. a) Let A be the following array. 16 23 31 20 4 (i) Show the array A after calling heapify on it to produce

3. a) Let A be the following array. 16 23 31 20 4 (i) Show the array A after calling heapify on it to produce a max-heap. (ii) Starting from the array in part (i), trace the steps of the heapsort algorithm on A (b An array B is unimodal if the elements are first decreasing and then incrcasing, i.e., there is an index k such that mi] > B[2] > >Mk] andBIk]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
