Given an array of n integers, find the contiguous subarray of given length k that has the maximum average value. Output the maximum average value.
This function takes in an array of integers and returns the sum of all the elements in the array.
Find the maximum sum of a contiguous subarray of length k in an array of n integers.