Straightforward knapsack impl working perfectly in O(W*n) time