Can u please explain how this code actually work in stack memory. With particular value of n and fxn call.
Unable to Understand with dryrun with stack
see this for n==5 fib(5) will expnd like this:
fib(5)
/ \
fib(4) fib(3)
/ \ / \
fib(3) fib(2) fib(2) fib(1)
/ \ / \ / \
fib(2) fib(1) fib(1) fib(0) fib(1) fib(0)
/ \
fib(1) fib(0)