Untitled

 avatar
unknown
plain_text
10 months ago
736 B
3
Indexable
A set of currency coins are given to you. The quantity of each coin is one. An amount is also given. You are Casked to say whether you can fulfill the given amount using these coins or not. Write an algorithm "Solve using dynamic programming for the same. In the following, some inputs/outputs are given to you for bette understanding. However, your algorithm must work for all possible inputs. (10 Marks) Sample input 1: Coins = (3, 5, 7, 9, 12), Amount 17 Sample output 1: True Explanation: 3+5+9 Sample input 2: Coins = (3, 5, 7, 9, 12), Amount = 6 Sample output 2: False Explanation: You have only one coin of 3 rupees. Any combination of coins cannot fulfill the amount Algorithm Solve (Coins, Amount) //Write your algorithm here..
Editor is loading...
Leave a Comment