Pergunta de entrevista da empresa Meta

One task is merge intervals, and the other is tree traverse