Question: 6. [15 points] A lazy programmer thinks that implementing the Merge subroutine of the mergesort algorithm is too complicated. To simplify mergesort, he eliminates the

 6. [15 points] A lazy programmer thinks that implementing the Merge

6. [15 points] A lazy programmer thinks that implementing the Merge subroutine of the mergesort algorithm is too complicated. To simplify mergesort, he eliminates the merge subroutine altogether, and only recursively sorts the two halves of the array. Here is his pseudocode. 3: 1: procedure LAZY SORT(A[1 .. n)) 2: if n > 1 then m+ [n/2] LAZYSORT(A[1.. m) LAZYSORT(A[m+1..n]) Help the lazy programmer to understand his algorithm by answering the following questions. 5: a) What does LAZYSORT do, if anything? Briefly explain your answer. b) What is the recurrence relation for the asymptotic time complexity of LAZYSORT? Use the Master theorem to solve the recurrence

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 Databases Questions!