Google interview question

DSA question based on Intervals, Heaps