



My Calendar 1: Leetcode - Solved this
Follow up on this: - Code not working as expected
3. Merge events:
merge(10, 20) => [[10, 20]]
merge(40, 50) => [[10, 20], [40, 50]]
merge(20, 30) => [[10, 30], [40, 50]]
merge(45, 55) => [[10, 30], [40, 55]]I solved it using merge intervals algorithm, but interviewer was expecting better solution than that.
Tried to think of an approach, was able to explain the approach. But coding took some time and at the end code was not giving expected output.
Due to nervousness couldn't code it up.
All the best in your journey :)