Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimizing Coins #224

Closed
dahiya-code opened this issue Oct 1, 2021 · 1 comment
Closed

Minimizing Coins #224

dahiya-code opened this issue Oct 1, 2021 · 1 comment
Assignees

Comments

@dahiya-code
Copy link
Contributor

dahiya-code commented Oct 1, 2021

Consider a money system consisting of n coins. 
Each coin has a positive integer value. 
Your task is to produce a sum of money x 
using the available coins in such a way that the 
number of coins is minimal.

For example, 
if the coins are {1,5,7} and the desired sum is 11, 
an optimal solution is 5+5+1 which requires 3 coins.

C++ DP soln

@dahiya-code
Copy link
Contributor Author

dahiya-code commented Oct 1, 2021

Closes #228

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants