Concept Flow - Fractional Knapsack Problem
Start with empty knapsack
Sort items by value/weight ratio
For each item in sorted order
Can full item fit?
No→Take fraction to fill knapsack
|Yes
Add full item to knapsack
Knapsack full?
No→Next item
Yes
Done
We sort items by value per weight, then add as much as possible from each until the knapsack is full.