loading…
Write max_window_sum(nums, k) that returns the largest sum of any k consecutive numbers. 1 <= k <= len(nums).
max_window_sum([2, 1, 5, 1, 3, 2], 3) -> 9 # 5 + 1 + 3
Stuck on the idea itself? The sliding window lesson walks through the pattern from scratch.