FanDuel interview question

Merge overlapping array of intervals