Fixed sliding window

easy

Consecutive windows share k−1 elements, so recomputing from scratch is waste. Add the entering value, subtract the leaving one - O(1) per position.

Worst O(n)Space O(1)
Loading the fixed sliding window engine…

Where to go next