Minimum money needed [Top Down Approach]

Hi, I’m trying to write down a recursive approach for minimum money needed problem. But failing to implement it properly. Can you help by looking at my code?

Code: https://ide.codingblocks.com/s/590808

try to do it using the same concept of 0-n knapsack

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.