File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -282,7 +282,7 @@ or equal to those of the children and the lowest key is in the root node
282
282
* Given a target amount V cents and a list of denominations of n coins, i.e. we have coinValue[ i] (in cents) for coin types i from [ 0...n - 1] ,
283
283
what is the minimum number of coins that we must use to represent amount V? Assume that we have an unlimited supply of coins of any type
284
284
* Coins - Penny (1 cent), Nickel (5 cents), Dime (10 cents), Quarter (25 cents)
285
- * Assume V = 43 . We can use the Greedy algorithm of continuously selecting the largest coin denomination less than or equal to V, subtract that
285
+ * Assume V = 41 . We can use the Greedy algorithm of continuously selecting the largest coin denomination less than or equal to V, subtract that
286
286
coin's value from V, and repeat.
287
287
* V = 41 | 0 coins used
288
288
* V = 16 | 1 coin used (41 - 25 = 16)
You can’t perform that action at this time.
0 commit comments