Amazon interview question

One mid question I faced in the technical interview, is leetcode - Time intervals question.