Skip to content

Solves and prints the cache to the console the classic dynamic programming coin change problem (min coin and max combinations).

Notifications You must be signed in to change notification settings

dkenyon/coin-change-dynamic-programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Dynamic Programming Coin Change

Solves and prints the cache to the console the classic dynamic programming coin change problem (min coin and max combinations).

  • Verify your solution and trace logic through printed cache.
  • Solves two variations of this problem:
    • Minimum number of coins to make a certain target value (solveMaxCombinations())
    • Maximum number of combinations of coin values to make a certain target value (solveMinCoins())
  • Kept in one class for copy + paste convenience.
  • Edit variables VALUE and COIN_VALUES at the top of the class, then run the program to have both coin change variants solved.

Known Bugs:

  • Minimum coin method solveMinCoins() doesn't work if there is no 1-value coin (03 JUL 2017)

About

Solves and prints the cache to the console the classic dynamic programming coin change problem (min coin and max combinations).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages