public int maxSubArray(int[] A) {
		// IMPORTANT: Please reset any member data you declared, as
		// the same Solution instance will be reused for each test case.
		int carry = 0;
		int[] DP = new int[A.length];
		for (int i = 0; i < A.length; ++i) {
			DP[i] = carry + A[i];
			if (carry + A[i] < 0) {
				carry = 0;
			} else {
				carry += A[i];
			}
		}
		int max = DP[0];
		for (int i = 1; i < A.length; ++i) {
			if (DP[i] > max) {
				max = DP[i];
			}
		}
		return max;
	}