comefrom: <awangdev>Maximum Average Subarray I_1.java
code: public double findMaxAverage(int[] nums, int k) {
          if (nums == null || nums.length == 0) {
              return 0;
          }
          double sum = 0;
          for (int i = 0; i < k; i++) {
              sum += nums[i];
          }
          
          double max = sum;
          for (int i = k; i < nums.length; i++) {
              max = Math.max(sum, max);
              sum = sum - nums[i - k] + nums[i];
          }
          max = Math.max(sum, max);
          return max / k;
      }
masked: public double sample_funcname ( int [ ] var_0 , int var_1 ) {
    if ( var_0 == null || var_0 . length == 0 ) {
      return 0 ;
    }
    double var_2 = 0 ;
    for ( int var_3 = 0 ;
    var_3 < var_1 ;
    var_3 ++ ) {
      var_2 += var_0 [ var_3 ] ;
    }
    double max = var_2 ;
    for ( int var_3 = var_1 ;
    var_3 < var_0 . length ;
    var_3 ++ ) {
      max = Math . max ( var_2 , max ) ;
      var_2 = var_2 - var_0 [ var_3 - var_1 ] + var_0 [ var_3 ] ;
    }
    max = Math . max ( var_2 , max ) ;
    return max / var_1 ;
  }
  