Question: Consider a modified version of Mergesort algorithm, which works as follows. if the array has less than 3 elements, then we sort it trivially otherwise,
Consider a modified version of Mergesort algorithm, which works as follows.
if the array has less than elements, then we sort it trivially
otherwise, we
recursively sort the first third of the array
recursively sort the second third of the array
recursively sort the final third of the array
merge the first third with the second third
merge the first twothird with the final third
return thefnal merged array
Which of these best captures the recurrence for the running time of the above algorithm? You may ignore floors and ceilings or assume that the size of array is a power of
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
