comefrom: <awangdev>560. Subarray Sum Equals K_1.java
code: public int subarraySum(int[] nums, int k) {
          if (nums == null || nums.length == 0) return 0;
  
          Map<Integer, Integer> preSumCount = new HashMap<>();
          int n = nums.length, sum = 0, count = 0;
          preSumCount.put(0, 1);
          for (int num : nums) {
              sum += num;
              int priorSum = sum - k;
              if (preSumCount.containsKey(priorSum)) { 
                  count += preSumCount.get(priorSum);
              }
              preSumCount.put(sum, preSumCount.getOrDefault(sum, 0) + 1);
          }
          return count;
      }
masked: public int sample_funcname ( int [ ] var_0 , int var_1 ) {
    if ( var_0 == null || var_0 . length == 0 ) return 0 ;
    Map < Integer , Integer > var_8 = new HashMap < > ( ) ;
    int var_9 = var_0 . length , var_10 = 0 , var_11 = 0 ;
    var_8 . put ( 0 , 1 ) ;
    for ( int var_14 : var_0 ) {
      var_10 += var_14 ;
      int var_15 = var_10 - var_1 ;
      if ( var_8 . containsKey ( var_15 ) ) {
        var_11 += var_8 . get ( var_15 ) ;
      }
      var_8 . put ( var_10 , var_8 . getOrDefault ( var_10 , 0 ) + 1 ) ;
    }
    return var_11 ;
  }
  