Question d’entretien chez Amazon

1-dimensional DP with additional optimizations