Pergunta de entrevista da empresa Microsoft

Dynamic programming problem, or maybe it was greedy