Question: In this problem, we will attempt to improve merge sort by splitting the array to be sorted Into more than two parts. First, design an

In this problem, we will attempt to improve merge sort by splitting the array to be sorted Into more than two parts. First, design an algorithm to merge k sorted arrays of length n/k Into a single sorted array of length n, as efficiently as possible. Since we want to know the Impact of k on our algorithm It should not be treated as a constant which is hidden by O-notation. it is not too difficult to write an algorithm that runs In O(kn) lime, but It Is possible to write an algorithm that runs In O(log(k)n). Second, use your k-way merge algorithm to Implement a k-way merge sort algorithm. What Is the runtime of your algorithm? Is It faster than normal merge sort based on O-notation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
