<gouthampradhan>hashing_MaximumSizeSubarraySumEqualsk_1.java
public int maxSubArrayLen(int[] nums, int k) {
    Map<Integer, Integer> index = new HashMap<>();
    int sum = 0;
    for (int i = 0; i < nums.length; i++) {
      sum += nums[i];
      index.putIfAbsent(sum, i);
    }
    sum = 0;
    int ans = 0;
    for (int i = 0; i < nums.length; i++) {
      sum += nums[i];
      if (sum == k) {
        ans = Math.max(ans, i + 1);
      } else {
        int exp = sum - k;
        if (index.containsKey(exp)) {
          int farLeft = index.get(exp);
          if (farLeft < i) {
            ans = Math.max(ans, i - index.get(exp));
          }
        }
      }
    }
    return ans;
  }
public int sample_funcname ( int [ ] var_0 , int var_1 ) {
  Map < Integer , Integer > var_5 = new HashMap < > ( ) ;
  int var_7 = 0 ;
  for ( int var_8 = 0 ;
  var_8 < var_0 . length ;
  var_8 ++ ) {
    var_7 += var_0 [ var_8 ] ;
    var_5 . putIfAbsent ( var_7 , var_8 ) ;
  }
  var_7 = 0 ;
  int var_11 = 0 ;
  for ( int var_8 = 0 ;
  var_8 < var_0 . length ;
  var_8 ++ ) {
    var_7 += var_0 [ var_8 ] ;
    if ( var_7 == var_1 ) {
      var_11 = Math . max ( var_11 , var_8 + 1 ) ;
    }
    else {
      int var_15 = var_7 - var_1 ;
      if ( var_5 . containsKey ( var_15 ) ) {
        int var_18 = var_5 . get ( var_15 ) ;
        if ( var_18 < var_8 ) {
          var_11 = Math . max ( var_11 , var_8 - var_5 . get ( var_15 ) ) ;
        }
      }
    }
  }
  return var_11 ;
}
