Implemented Knapsack with Dynamic Programming