Knapsack problem/Unbounded/Python dynamic programming: Difference between revisions

Content deleted Content added
Extra, (long but fast), Python DP solution
 
Line 3: Line 3:
=={{header|Python}}==
=={{header|Python}}==
===Dynamic Programming Solution===
===Dynamic Programming Solution===
This solution trades off having to search over all possible combinations of items by having to enumerate over all possible sizes of (weight, volume) for each item.
This solution trades off having to search over all possible combinations of items by having to enumerate over all possible sizes of (weight, volume) for each item. The example builds in complexity to the final DP program.


====Brute force, single size attribute====
====Brute force, single size attribute====