Domanda di colloquio di The Akanksha Fund

How would you merge overlapping intervals in an array?