Let there be a function f();
void f(int n)
{
if(n<=1)
return;
f(n-1);
f(n-1);
}
I have 2 major questions regarding this code:
- What is the total number of recursive calls?
- What is the total number of calls?
and also What is the time complexity of this code?
Basically, I want to understand difference between calls and recursive calls and whether total calls also include the recursive calls.