Skip to content

Instantly share code, notes, and snippets.

@aronerben
Created October 20, 2020 13:57
Show Gist options
  • Save aronerben/ab1b8e42f9ee38d5216e2f2bd40673d8 to your computer and use it in GitHub Desktop.
Save aronerben/ab1b8e42f9ee38d5216e2f2bd40673d8 to your computer and use it in GitHub Desktop.
Set of coin values: {1, 2, 5, 10}
Target value: 15
Some combinations which all sum up to 15:
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
[1, 2, 2, 5, 5]
[5, 10] [10, 5] is the same solution
[1, 1, 1, 1, 1, 10]
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment