Pregunta de entrevista de Riverbed Technology

write code to merge overlapping intervals.