Skip to content

Commit

Permalink
Fix small typo in README.md
Browse files Browse the repository at this point in the history
Fix minor typo in the denomination problem present in the "Greedy Algorithms" section of README.md
  • Loading branch information
abagasra98 authored Oct 26, 2017
1 parent b1aa255 commit c1b3b4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ or equal to those of the children and the lowest key is in the root node
* 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],
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
* Coins - Penny (1 cent), Nickel (5 cents), Dime (10 cents), Quarter (25 cents)
* Assume V = 43. We can use the Greedy algorithm of continuously selecting the largest coin denomination less than or equal to V, subtract that
* Assume V = 41. We can use the Greedy algorithm of continuously selecting the largest coin denomination less than or equal to V, subtract that
coin's value from V, and repeat.
* V = 41 | 0 coins used
* V = 16 | 1 coin used (41 - 25 = 16)
Expand Down

0 comments on commit c1b3b4c

Please sign in to comment.