Maximum Average Subarray I
Easy · Arrays & Strings · about 10 minutes
Asked at Microsoft, Meta, Bloomberg, Amazon, Google.
Look at every window of exactly k consecutive values in nums and return the largest average any window has. Answers within 10⁻⁵ of the true value are accepted.