Merge Intervals problem