Concept Flow - Fractional Knapsack Problem
Start: Given items with weights and values
Calculate value/weight ratio for each item
Sort items by ratio descending
Initialize total_weight = 0, total_value = 0
For each item in sorted list
If item fits fully: Add full weight and value
Else: Add fractional part to fill knapsack
Stop when knapsack is full or all items processed
Return total_value as max profit
The flow shows how items are sorted by value per weight and added fully or partially to maximize total value within capacity.
