Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to makechanges with these coins for a given amount of money.For example, if we have 11 cents, then we can make changes with one 10-cent coin and one 1-centcoin…