Foundations
Sliding Window
Answer questions about contiguous subarrays and substrings in one pass: grow the window on the right, shrink it on the left, and never recompute from scratch.
0 of 3 lessons complete, 0 of 7 problems solved
Coursework
36 min
Up next
The Idea: Slide, Don't Restart
Reuse the previous window's work with a running sum, and learn to spot window problems.
10 min
Variable Windows: Expand and Shrink
The two-pointer template for longest and shortest windows, driven by a validity rule.
13 min
Counting Windows and the Window Maximum
Track letter counts, turn "exactly k" into "at most k", and preview the monotonic deque.
13 min
Practice ladder
Start with the first problem, then work toward the harder variations. Run examples before submitting against all tests.
Next unit: Prefix Sums