Added UPC code to solve knapsack problem