Impact Analytics interview question

Merge intervals leetcode medium question