<awangdev>523. Continuous Subarray Sum_1.java
public boolean checkSubarraySum(int[] nums, int k) {
        k = k == 0 ? Integer.MAX_VALUE : Math.abs(k); 
        if (nums.length / 2 > k) return true; 
        
        Set<Integer> set = new HashSet<>();
        int lastMod = 0;
        for (int num : nums) {
            int mod = (lastMod + num) % k;
            if (set.contains(mod)) return true;
            set.add(lastMod);
            lastMod = mod;
        }

        return false;
    }
public boolean var_0 ( int [ ] var_1 , int var_2 ) {
  var_2 = var_2 == 0 ? Integer . MAX_VALUE : Math . abs ( var_2 ) ;
  if ( var_1 . length / 2 > var_2 ) return true ;
  Set < Integer > var_12 = new HashSet < > ( ) ;
  int var_13 = 0 ;
  for ( int var_14 : var_1 ) {
    int var_15 = ( var_13 + var_14 ) % var_2 ;
    if ( var_12 . contains ( var_15 ) ) return true ;
    var_12 . add ( var_13 ) ;
    var_13 = var_15 ;
  }
  return false ;
}
