comefrom: <awangdev>Contiguous Array_1.java
code: public int findMaxLength(int[] nums) {
          if (nums == null || nums.length == 0) return 0;
          for (int i = 0; i < nums.length; i++) { 
              if (nums[i] == 0) nums[i] = -1;
          }
          Map<Integer, Integer> map = new HashMap<>();
          map.put(0, -1);
  
          int preSum = 0, max = 0;
          for (int i = 0; i < nums.length; i++) {
              preSum += nums[i];
              if (map.containsKey(preSum)) {
                  max = Math.max(max, i - map.get(preSum));
              }
              if (!map.containsKey(preSum)) {
                  map.put(preSum, i);
              }
          }
  
          return max;
      }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 == null || var_0 . length == 0 ) return 0 ;
    for ( int var_4 = 0 ;
    var_4 < var_0 . length ;
    var_4 ++ ) {
      if ( var_0 [ var_4 ] == 0 ) var_0 [ var_4 ] = - 1 ;
    }
    Map < Integer , Integer > var_9 = new HashMap < > ( ) ;
    var_9 . put ( 0 , - 1 ) ;
    int var_11 = 0 , max = 0 ;
    for ( int var_4 = 0 ;
    var_4 < var_0 . length ;
    var_4 ++ ) {
      var_11 += var_0 [ var_4 ] ;
      if ( var_9 . containsKey ( var_11 ) ) {
        max = Math . max ( max , var_4 - var_9 . get ( var_11 ) ) ;
      }
      if ( ! var_9 . containsKey ( var_11 ) ) {
        var_9 . put ( var_11 , var_4 ) ;
      }
    }
    return max ;
  }
  