knapsack-min-overflow
v1.0.0
Published
Solves a variation of knapsack problem. Target is to fulfill `capacity` using values from the `values` array while minimizing overflow over `capacity`.
Downloads
6
Maintainers
Readme
Solves a variation of knapsack problem.
Target is to fulfill capacity
using values from the values
array while minimizing overflow over capacity
.
The problem is NP-complete, so we try some heuristics here to get as close to ideal as fast as possible. Feel free to try and improve.