Question: T ( n ) = { 1 f o r n 3 4 T ( n 2 ) + n l o g n f

T(n)={1forn34T(n2)+nlognfoR
a.(6 points) Given a max-heap represented by array A[1..7]=(:9,6,8,3,5,4,2:), perform MAx-HEAP-
Delete(A,2) to remove the element '6' from the heap. Show the updated array after each step (a swap
or a key value change). For each step, draw the corresponding binary tree representation along with the
updated array.
b.(4 points) Analyze the running time of algorithm MAX-HEAP-Delete (in terms of heap size n). If the
best-case and worst-case running times differ, specify each using notation, and describe the scenarios
that lead to the best-case and worst-case performance.
T ( n ) = { 1 f o r n 3 4 T ( n 2 ) + n l o g n f

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!