Question d’entretien chez Google

An improvement using dynamic programming was required for the last question.