mergeIntervals.cpp