Skip to content
Code ReadingSliding Window
Bug Hunt

Sliding Window

It should return the sum of every run of k neighbours: [1, 2, 3, 4] with k = 2 gives [3, 5, 7]. One window goes missing. Find the line and the kind of bug.

Click the line you think is wrong.