Question d’entretien chez Google

Popular algorithmic problems, I got an interval question.