Comcast interview question

Question related to non overlapping interval