knapsack_solve
Read-onlyIdempotent
Solves the 0-1 knapsack problem by selecting items that maximize total value without exceeding a specified weight capacity.
Instructions
Solve the 0-1 knapsack problem: pick items to maximize value within a weight capacity.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Array of { name?, weight, value } objects. | |
| capacity | Yes | Maximum weight capacity (integer units, max 100000). |