Checkpoint: fix the window sum
Challenge on lesson: Checkpoint: the window boundary
CHALLENGE
Difficulty: advanced+25 XP
The method should return the **largest sum of any k consecutive elements** (k >= 1, array longer than k). It returns wrong values whenever the best window touches the array's end. Find and fix the bug.
Press Submit to check your solution.
Back to lesson: Checkpoint: the window boundary