correction above :- It can be solved using DP
here is the recurrence eqn:-
coin[ i ] = 1+ min{ coin[ i - denom( j ) ] } if i >=1 and 1< j <ArrayLen(denom)
base cases :- c[ i ]= inf if i < 0
c[ i ] = 0 if i==0
--
correction above :- It can be solved using DP
here is the recurrence eqn:-
coin[ i ] = 1+ min{ coin[ i - denom( j ) ] } if i >=1 and 1< j <ArrayLen(denom)
base cases :- c[ i ]= inf if i < 0
c[ i ] = 0 if i==0
--