Ladder problem using recursion

k variable kya h ??
iss problem ka ladder function samaj nhi aaya

k is max jump that you can take at any step

in explanation k=3
so you can take 1 ,2,3 steps

which line you don’t understand??
it is a simple recursion relation which is explain in video

i recommend you to watch video again as it is explain clearly there

ek bataya tha na
return ladder(n-1)+ladder(n-2)+ladder(n-3);
isse dusra answer aa rha

ladder(n-1)+ladder(n-2)+ladder(n-3);
this is for k=3 only and it will give same ans
send me the link of code i will if there is any error

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.