@arun.nagari1985 why? I am already taking care of input being not in sorted order by sorting startTimes and endTimes array that I am forming. Also, this solution passes all the tests that run when you submit it. May be I am missing something. Can you please explain it to me?