Question d’entretien chez Google

a very difficult dynamic programming problem