public static void main(String[] args) {
        MergeIntervals solution = new MergeIntervals();
        ArrayList<Interval> intervals = new ArrayList<Interval>();
        intervals.add(new Interval(1, 3));
        //intervals.add(new Interval(2, 6));
        //intervals.add(new Interval(8, 10));
        intervals.add(new Interval(15, 18));
        System.out.println(solution.merge(intervals));
    }