<awangdev>Maximum Average Subarray I_1.java
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;
    }
public double sample_funcname ( int [ ] var_0 , int var_1 ) {
  if ( var_0 == null || var_0 . length == 0 ) {
    return 0 ;
  }
  double var_5 = 0 ;
  for ( int var_6 = 0 ;
  var_6 < var_1 ;
  var_6 ++ ) {
    var_5 += var_0 [ var_6 ] ;
  }
  double max = var_5 ;
  for ( int var_6 = var_1 ;
  var_6 < var_0 . length ;
  var_6 ++ ) {
    max = Math . max ( var_5 , max ) ;
    var_5 = var_5 - var_0 [ var_6 - var_1 ] + var_0 [ var_6 ] ;
  }
  max = Math . max ( var_5 , max ) ;
  return max / var_1 ;
}
