Pregunta de entrevista de Thales

Classic overlapping time interval question