if a.start <= b.start, only 1, 2 and 3 are possible from the above scenarios
for the two overlapping scenarios 2 and 3, this is how we will merge them:
O(n*log(n))
O(n)