why do we put fib(n+2) what is the reason
Class assignment
in the editorial it is given fib(n+2) what is the reason why do we pass N+2
hi @Somith
the recurrance relation is f(n) = f(n-1) + f(n-2) for n-2>=0
it can also be written as f(n+2) = f(n+1) + f(n) for n>=0
You can write it however you want
i did not understand
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.