S&P Global Interview Question

Knapsack problem