LinkedIn interview question

Code questions about intervals problem. Not the same problem in LC