Skip to content

Finite denominations when making change #49

@dgg

Description

@dgg

MakeChange() 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions