Domanda di colloquio di LinkedIn

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