Fixed small bug, knapsack alg correct in O(W*n) time