Justworks Interview Question

merge intervals to have no overlapping intervals