solve Merge Intervals