<awangdev>53. Maximum Subarray_3.java
public int maxSubArray(int[] nums) {
        if (nums == null || nums.length == 0) return 0;
        int n = nums.length, max = Integer.MIN_VALUE;
        int[] dp = new int[n + 1]; 
        dp[0] = 0;
        for (int i = 1; i <= n; i++) {
            dp[i] = Math.max(dp[i - 1] + nums[i - 1], nums[i - 1]);
            max = Math.max(max, dp[i]);
        }
        
        return max;
    }
public int sample_funcname ( int [ ] var_0 ) {
  if ( var_0 == null || var_0 . length == 0 ) return 0 ;
  int var_4 = var_0 . length , max = Integer . MIN_VALUE ;
  int [ ] var_9 = new int [ var_4 + 1 ] ;
  var_9 [ 0 ] = 0 ;
  for ( int var_10 = 1 ;
  var_10 <= var_4 ;
  var_10 ++ ) {
    var_9 [ var_10 ] = Math . max ( var_9 [ var_10 - 1 ] + var_0 [ var_10 - 1 ] , var_0 [ var_10 - 1 ] ) ;
    max = Math . max ( max , var_9 [ var_10 ] ) ;
  }
  return max ;
}
