dailyprog.club
Beta

Sun · Jun 21 · #3 · Easy

Max window sum

You're analyzing a stream of sensor readings. Given an array of integers readings and a window size k, return the maximum sum of any k consecutive readings. If k is larger than the number of readings, return null — there's no valid window.

maxWindowSum([1,2,3,4,5], 2)9

Your solution

Console

// run your code to see output here

Run your code, then Solve to submit