Maximum Average Subarray I
Description
Given an array consisting of n
integers, find the contiguous subarray of given length k
that has the maximum average value. And you need to output the maximum average value.
Example 1:
Note:
1 <=
k
<=n
<= 30,000.Elements of the given array will be in the range [-10,000, 10,000].
Solution
Last updated