private int findMaxVal(IntervalNode left, IntervalNode right, int end) {
		int maxVal = 0;
		int leftVal = 0;
		int rightVal = 0;
		if (null == left) {
			leftVal = Integer.MIN_VALUE;
		} else {
			leftVal = left.val.getMax();
		}
		if (null == right) {
			rightVal = Integer.MIN_VALUE;
		} else {
			rightVal = right.val.getMax();
		}

		if (leftVal >= rightVal && leftVal >= end) {
			maxVal = leftVal;
		} else if (rightVal >= leftVal && rightVal >= end) {
			maxVal = rightVal;
		} else if (end >= leftVal && end >= rightVal) {
			maxVal = end;
		}
		return maxVal;

	}