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