Metron, Inc. interview question

Merge intervals on leetcode, Medium