Ladder Problem Recursion

I am trying the same code but for n=4 and k=3 , it is giving me answer 81
Here is the link to the code

hello @siddharth_redhu

check now->