package leetcode.oj.maxmiumSubArray;

public class Solution {
	public int maxSubArray(int[] A) {
		int res = A[0];
		int length = A.length;
		int[][] data = new int[length][length];

		for (int i = 0; i < length; i++) {
			data[i][0] = A[i];
		}

		for (int i = 1; i < length; i++) {

		}

		return res;
	}
}

@@ -55,17 +55,20 @@
 ution %7B%0A
-%09
+    
 public i
@@ -97,96 +97,63 @@
 ) %7B%0A
-%09%09int res = A%5B0%5D;%0A%09%09int length = A.length;%0A%09%09int%5B%5D%5B%5D data = new int%5Blength%5D%5Blength%5D;%0A%0A%09%09
+        int ans = 0, maxn = Integer.MIN_VALUE;%0A        
 for 
@@ -164,24 +164,26 @@
  i = 0; i %3C 
+A.
 length; i++)
@@ -189,93 +189,310 @@
 ) %7B%0A
-%09%09%09data%5Bi%5D%5B0%5D = A%5Bi%5D;%0A%09%09%7D%0A%0A%09%09for (int i = 1; i %3C length; i++) %7B%0A%0A%09%09%7D%0A%0A%09%09return res;%0A%09
+            if (ans %3C 0) ans = 0;%0A            ans += A%5Bi%5D;%0A            maxn = Math.max(maxn, ans);%0A        %7D%0A        return maxn;%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        int%5B%5D A = %7B1, 2, -1, -2, 2, 1, -2, 1, 4, -5, 4%7D;%0A        System.out.println(new Solution().maxSubArray(A));%0A    
 %7D%0A%7D%0A

add code