Question: You have learned merge sort in data structures which sorts an array in nlogn time, it is a divide and conquer technique. We can
You have learned merge sort in data structures which sorts an array in nlogn time, it is a divide and conquer technique. We can enhance the performance of merge sort using the multithreading. First of all, you have to check the processor cores of your system, let's suppose your system processor has 4 cores. Now you have to create 4 threads and divide the array among these threads and sort them using merge sort. You have to take size of array and array elements from user. You have learned merge sort in data structures which sorts an array in nlogn time, it is a divide and conquer technique. We can enhance the performance of merge sort using the multithreading. First of all, you have to check the processor cores of your system, let's suppose your system processor has 4 cores. Now you have to create 4 threads and divide the array among these threads and sort them using merge sort. You have to take size of array and array elements from user.
Step by Step Solution
3.33 Rating (168 Votes )
There are 3 Steps involved in it
Lets break down the process and answer your questions in detail 1 How does merge sort work Merge sort is a divideandconquer sorting algorithm It works as follows a Divide The unsorted array is divided ... View full answer
Get step-by-step solutions from verified subject matter experts
