Knapsack problem/Unbounded: Difference between revisions

Content added Content deleted
Line 471: Line 471:


=={{header|Python}}==
=={{header|Python}}==
===Simple Basic Solution===
===Simple Solution===
This version is easy to understand and gets the job done, not over-generalizing. It's often the first kind of solution to try, and often good enough to keep. It follows the KISS principle, and doesn't use Python features just because they are available. It doesn't even need many comments.
This version is easy to understand and gets the job done, not over-generalizing. It's often the first kind of solution to try, and often good enough to keep. It follows the KISS principle, and doesn't use Python features just because they are available. It doesn't even need many comments.
<python>
<python>