Egnyte interview question

Merge intervals- merge all overlapping intervals