Question DSA-REC-0055
MediumWhat is the space complexity of a recursive DFS that goes n levels deep?
- A.
O(log n)
- B.
O(n) for the call stack
- 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
Recursion and Backtracking question
What is the space complexity of a recursive DFS that goes n levels deep?
O(log n)
O(n) for the call stack
Sign up free to see the answer and a step-by-step explanation.
O(2ⁿ)
O(1)