Solution: Money Change
Solutions for the Money Change Problem using a greedy approach.
We'll cover the following...
Solution 1: Use the largest denomination first
Here is the idea: while > , we keep taking a coin with the largest denomination that does not exceed , subtracting its value from , and adding to the count of the number of coins:
:
0
while 0:
if 10:
else if ...