Given an array `nums` and an integer `k`, find the contiguous window of length `k` with the highest average value and return that average.
If you have ever smoothed a noisy time-series with a moving average, this is that — turned into an O(n) algorithm.
Input: nums = [1,12,-5,-6,50,3], k = 4
Output: 12.75
Note: The window [12,-5,-6,50] averages 12.75.
// hit Run to execute the sample tests
// Interactive editor preview. Live code execution arrives with your early-access cohort.