Question: 2. Although merge sort is better than insertion sort but for small values of n nsertion sort is faster. Thus, we can use insertion sort

 2. Although merge sort is better than insertion sort but for

2. Although merge sort is better than insertion sort but for small values of n nsertion sort is faster. Thus, we can use insertion sort within merge sort for small sub arrays. Consider a modification to merge sort in which n/k sub lists of length k are sorted using insertion sort and then merged using merging mechanism. [3x2-6 a. What is the worst-case time complexity of the insertion sort when n/k sub lists, each of length k are sorted? What is the complexity of the whole modified algorithm? b. c. What is the largest value of k as a function of n for which the modified algorithm has the same asymptotic running time as standard merge sort

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!