If we don't consider stack call memory, then what is the space consumed by the recursive fibnonacci?
I read it here and it says 0(N) but I am confused whether we should include stack memory or not while considering the space.
The pseudocode:
int Fibonacci(int n)
{
if ( n == 0 )
return 0;
else if ( n == 1 )
return 1;
else
return ( Fibonacci(n-1) + Fibonacci(n-2) );
}