Linear knapsack with backtracking works now, will clean code later