Search & scan line
Sliding Window problems
Questions about a run of neighboring items: the longest, the shortest, or the best one. The run's two edges only move forward, so each item enters it once and leaves it once.
- 1 easy
- 3 medium
- 2 hard
The 6 problems
In the order the app teaches them. Each page has the problem, five hints and the explained solution.
On the roadmap
Sliding Window is a station on the search & scan line. It builds on Two Pointers. Next comes Binary Search.
The roadmap says why each line runs in its order.
Patterns
3 patterns solve these problems. Naming them gives the problems’ methods away, so the list is folded.
Show the 3
- Variable sliding window4 problems
- Fixed-size sliding window1 problem
- Monotonic queue1 problem