Question d’entretien chez Amazon

Question with either dynamic programming or one of 15 patterns