Question d’entretien chez Uber

Haker Rank medium to difficult Dynamic Programming question.