Question: #1 - Modified Mergesort (place your answer on page 2 of your .pdf) Consider the following modification to mergesort: void modifiedMergesort(int[] a, int left, int

#1 - Modified Mergesort (place your answer on page 2 of your .pdf) Consider the following modification to mergesort: void modifiedMergesort(int[] a, int left, int right) { if (left A[i+1]) return false; return true; } The idea behind this modification is that if a portion of the array is already sorted, then we don't need to recurse, potentially saving time. This idea, while promising, is incorrectly implemented above (it's got a bug), causing a significant asymptotic slowdown for modified Mergesort. Analyze the running time of each function and prove the time complexity for modifiedMergesort is 0 (na). (To keep this proof shorter, you may assume the recursive depth of modified Mergesort is Ig(n). You may also assume that the merge function correctly merges two arrays between left and right and stores them back into the array a.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
