Pergunta de entrevista da empresa Network 18

Merge intervals in which intervals are given in array of array format