Roblox Interview Question

The last question was the 0-1 Knapsack problem