Question d’entretien chez Amazon

A coding problem involving sorting intervals