Mental Model
A sliding window moves over the array to consider a subset of elements at a time, updating the result efficiently without redoing work.
Analogy: Imagine looking through a small window on a long fence. You slide the window along the fence to see different parts without moving the whole fence.
Array: [1] [2] [3] [4] [5] [6] [7]
Window: ↑-----↑
indexes 1 to 3