Question: (6') 4. Write the following recursive function void mergeSort (int AI, int left, int right) with no loop inside to implement Merge Sort with a
(6') 4. Write the following recursive function void mergeSort (int AI, int left, int right) with no loop inside to implement Merge Sort with a given function void merge (int A, int left, int middle, int right) which "merges" sorted sub-array A[left...middle] and A[middle+1..right] to make Afleft...right] sorted. That is, you can assumed merge is correctly implemented by someone else and is provided to you, and you can simply call the function merge in your implementation of mergesort. You are NOT asked to implement merge here. void mergeSort (int All, int left, int right) // Your code
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
