added knapsack algorithms