VISUALGO//POINTERS
fixed window · two-pointer trace console · O(n)
Goal:Find the maximum sum of any 3 consecutive elements by sliding a fixed-size window across the array.
16
0
6
1
14
2
13
3
20
4
10
5
1
6
16
7
4
8
3
9
▲
L
▲
R
ARRAY SIZE
WINDOW SIZE (K)
READOUT
step0 / 8
current sum36
best sum36
best start0
statusIDLE