Question d’entretien chez Amazon

A question on Dynamic programming