In: Computer Science
MergeSort has a rather high memory space requirement, because every recursive call maintains a copy of the sorted subarrays that will be merged in the merge step. What is the memory space requirement in terms of O(.)? Describe how you would implement MergeSort in such a way that merge is done in-place and less memory space is needed? In-place means MergeSort does not take extra memory for the merge operation as in the default implementation.