Pergunta de entrevista da empresa Justworks

merge intervals to have no overlapping intervals