add solution for MergeIntervals