knapsack algorithm 5860538