Pregunta de entrevista de DoorDash

Dynamic programming problem similar to knapsack