Question d’entretien chez Amazon

I had a dynamic programming question