- 2
Sorting using Divide and Conquer and implementation ( In Class) - Implementing Merge Sort
Given an unsorted array, your task is to sort the array using merge sort. Input User Task: Since this will be a functional problem, you don't have to take input. You just have to complete the function implementMergeSort() that takes 3 arguments. arr: input array start: starting index which is 0 end: ending index of array Constraints 1 <= T <= 100 1 <= N <= 10^4 1 <= Arr[i] <= 10^5 Sum of 'N' over all test cases does not exceed 10^6 Output You need to return the sorted array. The driver code will print the array in sorted form.
4 Réponses