Question: Please clearly if you solve it by hand. thank you so much (15 points) Consider INCR-BUILD-MAX HEAP(A) INCR-BUILD-MAX-HEAP(A) heap-sizeA= 1 for i = 2 to

Please clearly if you solve it by hand. thank you so much
(15 points) Consider INCR-BUILD-MAX HEAP(A) INCR-BUILD-MAX-HEAP(A) heap-sizeA= 1 for i = 2 to length a. Does INCR-BUILD-MAX HEAP(A) build the same heap as BUILD-MAX-HEAP(A)? Either prove that it does or give a counter example. do MAX-HEAP-INSERT(A, AI i]) b. Show that in the worst case INCR-BUILD-MAX-HEAP(A) requires (Ign) time to build an n-element heap c. Explain why, even though BUILD-MAX-HEAP(A) has a O(n) time bound, it doesn't seem like INCR-BUILD-MAX-HEAP(A), which is bounded by (nlgn), should be able to get a (n) bound
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
