Step 1: Split array into two halves
[38, 27, 43] [3, 9, 82, 10]
Why: Divide the problem into smaller parts to make sorting easier
Step 2: Split left half [38, 27, 43] into [38] and [27, 43]
[38] [27, 43] [3, 9, 82, 10]
Why: Keep dividing until subarrays have one element
Step 3: Split [27, 43] into [27] and [43]
[38] [27] [43] [3, 9, 82, 10]
Why: Single elements are considered sorted
Step 4: Merge [27] and [43] into sorted [27, 43]
[38] [27, 43] [3, 9, 82, 10]
Why: Combine sorted subarrays into bigger sorted arrays
Step 5: Merge [38] and [27, 43] into sorted [27, 38, 43]
[27, 38, 43] [3, 9, 82, 10]
Why: Continue merging sorted parts
Step 6: Split right half [3, 9, 82, 10] into [3, 9] and [82, 10]
[27, 38, 43] [3, 9] [82, 10]
Why: Divide right half to sort smaller parts
Step 7: Split [3, 9] into [3] and [9]
[27, 38, 43] [3] [9] [82, 10]
Why: Single elements are sorted
Step 8: Merge [3] and [9] into [3, 9]
[27, 38, 43] [3, 9] [82, 10]
Why: Merge sorted elements
Step 9: Split [82, 10] into [82] and [10]
[27, 38, 43] [3, 9] [82] [10]
Why: Divide until single elements
Step 10: Merge [82] and [10] into [10, 82]
[27, 38, 43] [3, 9] [10, 82]
Why: Merge sorted elements
Step 11: Merge [3, 9] and [10, 82] into [3, 9, 10, 82]
[27, 38, 43] [3, 9, 10, 82]
Step 12: Merge [27, 38, 43] and [3, 9, 10, 82] into fully sorted [3, 9, 10, 27, 38, 43, 82]
[3, 9, 10, 27, 38, 43, 82]
Why: Final merge to get fully sorted array
Result: [3, 9, 10, 27, 38, 43, 82]