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

Finite denominations when making optimal change #50

Open
dgg opened this issue Jun 15, 2017 · 0 comments
Open

Finite denominations when making optimal change #50

dgg opened this issue Jun 15, 2017 · 0 comments

Comments

@dgg
Copy link
Owner

dgg commented Jun 15, 2017

MakeOptimalChange() works under the premise that the set of denominations that is passed is infinite, that is, we never "run out" of pieces for each denomination.

In the real-world, there is only a finite amount of pieces of each denomination. Change the algorithm (and change Denomination as well) or create another method (taking, for instance a collection of FiniteDenominations) to support this real-world scenario.

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

No branches or pull requests

1 participant