Solved Merge Intervals Problem