title: Find Maximum Average Subarray Of K Length 1
signature: function find_maximum_average_subarray_of_k_length_1(arr, n, k)
source_py: def find_maximum_average_subarray_of_k_length_1(arr, n, k):
      if (k > n):
          return (- 1)
      sum = arr[0]
      for i in range(1, k):
          sum += arr[i]
      max_sum = sum
      max_end = (k - 1)
      for i in range(k, n):
          sum = ((sum + arr[i]) - arr[(i - k)])
          if (sum > max_sum):
              max_sum = sum
              max_end = i
      return ((max_end - k) + 1)
source_cpp: int find_maximum_average_subarray_of_k_length_1(vector<int> arr, int n, int k) {
    if ( k > n ) return - 1;
    int sum = arr [ 0 ];
    for ( int i = 1;
    i < k;
    i ++ ) sum += arr [ i ];
    int max_sum = sum, max_end = k - 1;
    for ( int i = k;
    i < n;
    i ++ ) {
      int sum = sum + arr [ i ] - arr [ i - k ];
      if ( sum > max_sum ) {
        max_sum = sum;
        max_end = i;
      }
    }
    return max_end - k + 1;
  }