Question DSA-REC-0028
Easyf(n) calls f(n − 1) and stops when n reaches 0. How many calls are made in total for f(4), including the first?
- A.
4
- B.
6
- 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
f(n) calls f(n − 1) and stops when n reaches 0. How many calls are made in total for f(4), including the first?
4
6
Sign up free to see the answer and a step-by-step explanation.
5
16