Saturday, December 10, 2011 No. 26 - Minimal Number of Coins for Change Problem: Please implement a function which gets the minimal number of coins, whose value is v 1 , v 2 , …, v n , to make change for an amount of money with value t. Any coin with value v i may duplicate for any times to make change. For example, the minimal number of coins to make change for 15 out of a set of coins with value 1, 3, 9, 10 is 3. We can choose two coins with value 3 and a coin with value 9. The number of coins for other choices should be greater than 3. Analysis:
Read full article from Coding Interview Questions: No. 26 - Minimal Number of Coins for Change
No comments:
Post a Comment