Goldman Sachs interview question

Knapsack based problem.