Which operation is mainly responsible for combining the sorted subarrays in Merge Sort?

Options

  • A. Partitioning
  • B. Merging
  • C. Hashing
  • D. More than one of the above
  • E. None of the above

Correct Answer (Detailed Explanation is Below)

B. Merging

Detailed Explanation

The merge operation combines two already sorted subarrays into one sorted array. Two pointers are normally maintained, one for each sorted subarray. Their elements are compared, and the smaller element is copied into the resulting array. When one subarray becomes empty, the remaining elements of the other subarray are appended. This merging process takes O(n) time for n elements and is the key combine step of Merge Sort.