Skip to content

Glossary: Coding Interviews

Sliding window

Also written: window

A run of neighboring items from `left` to `right` that moves along a list, with a running total updated as items enter and leave. A variable window grows with `right` and shrinks from `left`, and needs non-negative numbers.

Where the book teaches it

Related terms

Two pointersPrefix sum