public int maxSubArrayOld(int[] A) {
		int n = A.length;
		int currentMax = Integer.MIN_VALUE;
		int maxMax = Integer.MIN_VALUE;
		int current = 0;

		for (int i = 0; i < n; i++) {
			currentMax = Integer.MIN_VALUE;
			current = 0;
			for (int j = 0; i + j < n; j++) {
				current += A[i + j];
				if (current > currentMax)
					currentMax = current;
				if (current > maxMax)
					maxMax = current;
				if (current < 0)
					break;
			}
		}
		return maxMax;
	}