Knapsack

Hoverbear,

Here's a solution to the knapsack problem. 

http://rosettacode.org/wiki/Knapsack_problem/0-1