Exchanging coin problem dp

I have proceeded as per question yet not getting any test case passed. Need just little help.
https://ide.codingblocks.com/s/47540

Hey Shanu, your code is wrong you have to take the max of coins and base case is also incorrect in your code. Here i am sharing my code you can refer this to understand how to memoize the matrix and write base case.

https://ide.codingblocks.com/s/48153 This got AC.