Working of Merge Sort
To Understand the working of merge sort follow these steps.
Consider an array arr = [ 38, 27, 43, 10]
Step 1: Divide the array into two equal halves.
Step 2: Further divide those subarrays in equal halves untill they become array of unit length and can’t be divided futher.
Step 3: Now, merge the unit array to form sorted subarrays and continue getting bigger subarrays.
Step 4: The merging process is continued till the sorted array is completely formed from the subarrays as shown.
Contact Us