Google interview question

Merge intervals leet code question