#subarray
Wiki
›
Algorithms
›
02. Data Structures
›
1. Core Data Structures and Operations
›
1.1 Arrays and Dynamic Arrays
›
Sliding Window Array
Sliding Window Array A sliding window tracks a contiguous subarray while moving its boundaries through the array. Instead of recomputing each subarray from scratch, it updates the current state when elements enter or leave the window. You use it when the problem asks about contiguous ranges, especially fixed-size windows or variable-size windows with a constraint. Problem Given an array $A$ of length $n$ and a window size $k$, find the...