Pregunta de entrevista de Google

DSA question based on Intervals, Heaps