Question d’entretien chez The Akanksha Fund

How would you merge overlapping intervals in an array?