How it works
Fixed vs dynamic windows
A fixed window keeps a constant size; a dynamic window expands and contracts based on a condition such as a sum or character count.
When to use it
Reach for it on contiguous-subarray or substring problems asking for a maximum, minimum, or count under a constraint.
Common pitfalls
Watch off-by-one bounds, when to shrink the window, and correctly updating state as elements leave.