Question DSA-REC-0002
EasyWhat is a base case in recursion?
- A.
The first line of the function
- B.
A global variable
- C.
Show answer and explanation
Answer: C
Without a base case the recursion never stops and the stack overflows.
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 a base case in recursion?
The first line of the function
A global variable
Answer: C
Without a base case the recursion never stops and the stack overflows.
The condition under which the function returns without calling itself
The largest input