public List<Interval> insert1(List<Interval> intervals, Interval newInterval) {
        if(intervals.size() == 0){
            intervals.add(newInterval);
            return intervals;
        }
        if(newInterval.start <= intervals.get(0).start)
            intervals.add(0, newInterval);
        else if(newInterval.start >= intervals.get(intervals.size() -1).start)
            intervals.add(newInterval);
        else{
            int index = 0;
            while(index < intervals.size() - 1){
                if(intervals.get(index).start <= newInterval.start && intervals.get(index + 1).start >= newInterval.start){
                    break;
                }
                index++;
            }
            intervals.add(index + 1, newInterval);
        }
        return mergeIntervals1(intervals);
    }