Given an array and a fixed window size k, find the maximum sum among all contiguous subarrays of exactly length k.
Example 1
Explanation: The window [5,1,3] (indices 2-4) sums to 9, the largest among all size-3 windows.
Example 2
Explanation: When k equals the array's length, there is exactly one window — the whole array.
Example 3
Explanation: With k = 1, every 'window' is a single element, so the answer is simply the maximum element.
Code execution is coming soon.