Didn’t get what happen after the array is reduced to 1 element and the merge_sort(arr,mid+1,n-1) is called??
Merge sort program
@Gurjot If only 1 element is remaining you don’t need to further sort the array, so it simply returns without doing anything. And then it is merged with another sorted subarray.