Knapsack Code for Discrete Optimization Course Provided by Coursera