Pergunta de entrevista da empresa Compass

Dynamic programming algorithm problem