Computer MOD
What is the space complexity of the merge sort algorithm?
Explanation
Merge Sort requires extra memory to merge sorted subarrays.It is not an in-place algorithm.Therefore, its space complexity is O(n) for an array of size n.Additional information:
Time complexity (Best) → O(n log n)Time complexity (Average) → O(n log n)Time complexity (Worst) → O(n log n)Recursion stack → O(log n)Last verified on 24-03-2026