changes to knapsack/Solver.java