Question d’entretien chez Pinterest

A problem that combines binary search with dynamic programming.