Skip to content

Latest commit

 

History

History
10 lines (5 loc) · 668 Bytes

File metadata and controls

10 lines (5 loc) · 668 Bytes

Discrete Knapsack

Change Problem

A computation problem describes as follow: given an integer amount of money for change and positive integers that representing different denominations coin1, coin2, .. coinn, find the minimum number of coins needed to make the change.

Note: this problem is a classic discrete knapsack problem with a distinct form.

If greedy approach is adopted in the selection process, it would be simple to construct such primitive that in each iteration of remaining coins, find the largest denomination and add it in the final tuple of results.