What is the space complexity of the Merge Sort algorithm ?
2025
What is the space complexity of the Merge Sort algorithm ?
Answer: B. O(n) — Merge Sort creates temporary arrays during the merge process, requiring space proportional to the input size.
- A.
O(1)
- B.
O(n)
- C.
O(log n)
- D.
O(n log n)
Attempted by 528 students.
Show answer & explanation
Correct answer: B
Merge Sort creates temporary arrays during the merge process, requiring space proportional to the input size.
Loading lesson…