Math, asked by johnspartan2915, 9 months ago

Given a set of coin types (denominations), and a total amount, find the minimum number of coins needed to make the total exactly when: infinite coins of each denomination are available and all denominations are powers of 5

Answers

Answered by Anonymous
3

Answer:

Input: coins[] = {25, 10, 5}, V = 30

Output: Minimum 2 coins required

We can use one coin of 25 cents and one of 5 cents

Input: coins[] = {9, 6, 5, 1}, V = 11

Output: Minimum 2 coins required

We can use one coin of 6 cents and 1 coin

mark it brainlist answer

Similar questions