You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 ofFiniteDenomination
s) to support this real-world scenario.The text was updated successfully, but these errors were encountered: