Merge Sort's worst-case space complexity is?
Merge Sort's worst-case space complexity is?
Choose an Option
Answer
O(n)
Theory
Merge Sort needs auxiliary memory equal to the input size for the merge step.
Solution
Auxiliary array of size n ⇒ O(n) extra space.