Like QuickSort Merge Sort is a Divide and Conquer algorithm. It divides the input array into two halves, calls itself for the two halves, and then it merges the two sorted halves. The merge() function is used for merging two halves. The merge(arr, l, m, r) is a key process that assumes that arr[l..m] and arr[m+1..r] are sorted and merges the two sorted sub-arrays into one
Output:
Enter the total number of elements :7
Enter the elements which to be sort: -569
-2
0
322
545
784
4584
After merge sorting elements are : -569 -2 0 322 545 784 4584
need an explanation for this answer? contact us directly to get an explanation for this answer