Solution for Merge Intervals