knapsack problem

My implementation of the knapsack problem.