Skip to content

Sliding Window

Andrew Shepherd edited this page Mar 5, 2026 · 2 revisions

Most sliding window problems are straightforward, once you have recognized it's a sliding window problem.

An interesting one was 3859. Count Subarrays With K Distinct Integers

In this one you had to maintain two sliding windows. I don't know if there is another example like this.

Clone this wiki locally