Question DSA-CX-0077
HardWhat is the space complexity of a recursive merge sort on a linked list (excluding the input)?
- A.
O(log n) for the recursion stack
- B.
O(n)
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Complexity Analysis question
What is the space complexity of a recursive merge sort on a linked list (excluding the input)?
O(log n) for the recursion stack
O(n)
Sign up free to see the answer and a step-by-step explanation.
O(1)
O(n log n)