Solved SumOfIntervals