<awangdev>Backpack V_2.java
public int backPackV(int[] nums, int target) {
        if (nums == null || nums.length == 0) {
            return 0;
        }
        int n = nums.length;
        int[][] dp = new int[2][target + 1];
        dp[0][0] = 1; 
        for (int j = 1; j <= target; j++) {
            dp[0][j] = 0;
        }
        int curr = 0, prev = 1;
        for (int i = 1; i <= n; i++) {
            prev = curr;
            curr = 1 - curr;
            for  (int j = 0; j <= target; j++) {
                dp[curr][j] = dp[prev][j];
                if (j - nums[i - 1] >= 0) {
                    dp[curr][j] += dp[prev][j - nums[i - 1]];    
                }
            }
        }
        return dp[curr][target];
    }
public int sample_funcname ( int [ ] var_0 , int var_1 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return 0 ;
  }
  int var_5 = var_0 . length ;
  int [ ] [ ] var_8 = new int [ 2 ] [ var_1 + 1 ] ;
  var_8 [ 0 ] [ 0 ] = 1 ;
  for ( int var_9 = 1 ;
  var_9 <= var_1 ;
  var_9 ++ ) {
    var_8 [ 0 ] [ var_9 ] = 0 ;
  }
  int var_10 = 0 , var_11 = 1 ;
  for ( int var_12 = 1 ;
  var_12 <= var_5 ;
  var_12 ++ ) {
    var_11 = var_10 ;
    var_10 = 1 - var_10 ;
    for ( int var_9 = 0 ;
    var_9 <= var_1 ;
    var_9 ++ ) {
      var_8 [ var_10 ] [ var_9 ] = var_8 [ var_11 ] [ var_9 ] ;
      if ( var_9 - var_0 [ var_12 - 1 ] >= 0 ) {
        var_8 [ var_10 ] [ var_9 ] += var_8 [ var_11 ] [ var_9 - var_0 [ var_12 - 1 ] ] ;
      }
    }
  }
  return var_8 [ var_10 ] [ var_1 ] ;
}
