public void insertIntervals(Interval interval, ArrayList<Interval> intervals) {
		int low = 0, high = intervals.size();
		while (low < high) {
			int mid = (high - low) / 2 + low;
			if (interval.start < intervals.get(mid).start) {
				high = mid;
			} else if (interval.start > intervals.get(mid).start) {
				low = mid + 1;
			} else if (interval.end < intervals.get(mid).end) {
				high = mid;
			} else {
				low = mid + 1;
			}
		}
		intervals.add(low, interval);
	}