Google interview question

Popular algorithmic problems, I got an interval question.