Question: . Modify SiftDown to have the following specification. proc SiftDown (L, U) pre Heap (L+1, U) post Heap (L, U) What is the run

. Modify SiftDown to have the following specification. proc SiftDown (L, U) pre Heap (L+1, U) post Heap (L, U) What is the run time of the code? Show how it can be used to construct an N-element heap in O(N) time, and thereby a faster Heapsort with the follow- ing structure. Step 1 ? Heap Step N Heap Sorted Step 2N (Not only is this Heapsort faster than the one in the text, it also uses less code.)
Step by Step Solution
3.42 Rating (149 Votes )
There are 3 Steps involved in it
To modify the SiftDown procedure to have the specified specification we need to update the postcondi... View full answer
Get step-by-step solutions from verified subject matter experts
