← Back to All Algorithms

💰 Fractional Knapsack (Greedy)

Problem

Maximize value in knapsack. Unlike 0/1, you can take fractions of items!

Greedy Strategy: Sort by value/weight ratio. Take items greedily until knapsack is full.

Items (sorted by value/weight ratio)

Knapsack (Capacity: 50)

Weight Used
0
Total Value
0
Click "Start" to fill knapsack greedily