Not Able To Find the Solution! Please Help🙏

I am not able to find the correct solution of this problem.

Please check my code and give the correct recursion approach.

My Code -> https://ide.codingblocks.com/s/587580

NOTE :- I solving this using recursion, so please don’t given me the Dynamic Programming Approach!!:slightly_smiling_face:

check now ->

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.