643. Maximum Average Subarray I
You are given an integer array
nums
consisting ofn
elements, and an integerk
.Find a contiguous subarray whose length is equal to
k
that has the maximum average value and return this value. Any answer with a calculation error less than10-5
will be accepted.
1 | class Solution { |