Canonical interview question

Some question dealing with Knapsack problem