I'm practicing problems on dynamic programming.The problem is as follows:
You are given n types of coin denominations of values v(1) < v(2) < ... < v(n) (all integers). Assume v(1) = 1, so you can always make change for any amount of
money C. Give an algorithm which makes change for an amount of money C with as
few coins as possible.
Here is the solution which i have figured out..
So,the idea is to make a change such that we need fewer coins in making that be it of any denomination.
So,this is all about choices... If i need for 1 dollar i have one option i.e to select v1 -----> (1) this is an option
If for example ,we are making a change for 10 dollars
--->pick ten 'one' dollar notes ---->pick two 'five dollar notes ----->pick a 'ten' dollar note itself..
we need to calculate the minimum of these choices and return it as our
Is the approach i'm following is correct?