It's common to slide a "window" across an Array, like this:
When you slide a window across an Array, you only have to do 2 operations. You have to add a new element to the window, and you have to remove an old element. Here's a visual of this:
You'll get practice with this pattern in the next few problems.