Groups
Category
An exchange argument proves that any optimal solution can be reordered to satisfy a simple sorting rule by showing that swapping adjacent out-of-order elements never helps.
Knapsack problems ask how to pick items under a weight (or cost) limit to maximize value or to check if a target sum is reachable.