0/1 knapsack
medium 22 minPack items with weights and values into a bag of capacity W to get the most value, each item taken whole or not at all.
Where it shows up
The same pattern appears across everyday software.
Budget and project selection
Choosing which projects, features or ads to fund under a fixed budget, each with a cost and an expected return and none worth doing twice, is a 0/1 knapsack. Capital budgeting tools solve it, often with more than one constraint (money and headcount).
Cargo, luggage and container loading
Filling a truck, an aircraft hold or a carry-on with items of known weight and value is the textbook case, and the old app's camping, day hike and expedition trips are small versions of it. Real loaders add volume as a second capacity.
Resource allocation on servers
Placing jobs or virtual machines on a host with limited memory, where each job has a memory size and a priority, is a knapsack per host. Schedulers use DP for small cases and greedy or branch-and-bound heuristics at scale.
Cutting losses: the subset-sum family
Splitting a bill or a workload into two equal halves (partition), matching invoices to a payment total (subset sum) and balancing two machines (last stone weight II) all run the same right-to-left table with True/False cells.
Cryptography history
The Merkle-Hellman cryptosystem (1978) built a public key on the hardness of subset sum. It was broken because its special instances were easy, a reminder that NP-hard in the worst case does not mean every instance is hard.