Pregunta de entrevista de Intuit

Dynamic programming related coding question