Pergunta de entrevista da empresa DoorDash

Dynamic programming problem similar to knapsack