comefrom: <awangdev>416. Partition Equal Subset Sum_1.java
code: public boolean canPartition(int[] nums) {
          if (nums == null || nums.length < 2)  return false;
          int sum = 0;
          for (int num : nums) sum += num;
          if (sum % 2 != 0) return false;
          sum /= 2;
          
          boolean[] dp = new boolean[sum + 1];  
          dp[0] = true;
          for (int i = 0; i < nums.length; i++) {
              int num = nums[i];
              for (int j = sum; j >= num; j--) {
                  dp[j] = dp[j] || dp[j - num];
              }
          }
          return dp[sum];
      }
masked: public boolean var_0 ( int [ ] var_1 ) {
    if ( var_1 == null || var_1 . length < 2 ) return false ;
    int var_2 = 0 ;
    for ( int var_3 : var_1 ) var_2 += var_3 ;
    if ( var_2 % 2 != 0 ) return false ;
    var_2 /= 2 ;
    boolean [ ] var_4 = new boolean [ var_2 + 1 ] ;
    var_4 [ 0 ] = true ;
    for ( int var_5 = 0 ;
    var_5 < var_1 . length ;
    var_5 ++ ) {
      int var_3 = var_1 [ var_5 ] ;
      for ( int var_6 = var_2 ;
      var_6 >= var_3 ;
      var_6 -- ) {
        var_4 [ var_6 ] = var_4 [ var_6 ] || var_4 [ var_6 - var_3 ] ;
      }
    }
    return var_4 [ var_2 ] ;
  }
  