comefrom: <awangdev>Target Sum_1.java
code: public int findTargetSumWays(int[] nums, int S) {
          if (nums == null || nums.length == 0) return 0;
          
          int sum = 0;
          for (int num : nums) sum += num;
          if (sum < Math.abs(S)) return 0;
          
          int n = nums.length, m = (sum << 1) + 1;
          int[][] dp = new int[n][m];
          dp[0][sum - nums[0]] += 1;
          dp[0][sum + nums[0]] += 1;
          
          for (int i = 1; i < n; i++) {
              for (int j = 0; j < m; j++) { 
                  if (j - nums[i] >= 0) {
                      dp[i][j] += dp[i - 1][j - nums[i]];
                  }
                  if (j + nums[i] < m) {
                      dp[i][j] += dp[i - 1][j + nums[i]];    
                  }
              }
          }
          
          return dp[n - 1][S + sum];
      }
masked: public int sample_funcname ( int [ ] var_0 , int var_1 ) {
    if ( var_0 == null || var_0 . length == 0 ) return 0 ;
    int var_5 = 0 ;
    for ( int var_6 : var_0 ) var_5 += var_6 ;
    if ( var_5 < Math . abs ( var_1 ) ) return 0 ;
    int var_9 = var_0 . length , var_11 = ( var_5 << 1 ) + 1 ;
    int [ ] [ ] var_12 = new int [ var_9 ] [ var_11 ] ;
    var_12 [ 0 ] [ var_5 - var_0 [ 0 ] ] += 1 ;
    var_12 [ 0 ] [ var_5 + var_0 [ 0 ] ] += 1 ;
    for ( int var_13 = 1 ;
    var_13 < var_9 ;
    var_13 ++ ) {
      for ( int var_14 = 0 ;
      var_14 < var_11 ;
      var_14 ++ ) {
        if ( var_14 - var_0 [ var_13 ] >= 0 ) {
          var_12 [ var_13 ] [ var_14 ] += var_12 [ var_13 - 1 ] [ var_14 - var_0 [ var_13 ] ] ;
        }
        if ( var_14 + var_0 [ var_13 ] < var_11 ) {
          var_12 [ var_13 ] [ var_14 ] += var_12 [ var_13 - 1 ] [ var_14 + var_0 [ var_13 ] ] ;
        }
      }
    }
    return var_12 [ var_9 - 1 ] [ var_1 + var_5 ] ;
  }
  