Trivia ForgePlay free →

In the context of optimization, what is the primary difference between the items in the Fractional Knapsack problem versus the 0/1 Knapsack problem?

Show answer

Divisibility

In Fractional Knapsack, items can be broken into smaller pieces, allowing a greedy strategy (sorting by value/weight) to be optimal. In 0/1 Knapsack, items are indivisible, necessitating a Dynamic Programming approach.

Also asked as:
  • What characteristic of items allows the Fractional Knapsack problem to be solved greedily, unlike the 0/1 Knapsack problem?

Would you remember this in 6 months?

Trivia Forge uses spaced repetition so facts stick. Free, no signup needed.

Turn on Algorithms practice →

More Algorithms trivia

See all 83 →