I want to know the idea of algorithm for the coin change problem where each denomination has infinte number of coins. Means how to apply DP (like the standard coin change pr
This is how to translate a number from one numbering system to another. For example:
35 = 1*2^5 + 0*2^4 + 0*2^3 + 0*2^2 + 0*2^1 + 1*2^0
That is:
var cash = 35; var coins = [15, 10, 5, 1]; var change = {}; for(var i=0; i