Question d’entretien chez Goldman Sachs

Dynamic programming in coding, explaining how and what, roughly, will solve the problem