Module M15 · 15 of 35 in teaching order · Intermediate

Sliding Window

Fixed and variable windows with frequency tracking, and when the pattern does not apply.

Lessons

  1. Keep a running summary of a contiguous range and update it in O(1) per step: fixed-size windows, expand/shrink windows, and when the pattern fails.

Topics this module covers

The full module scope. Topics without a lesson above are not written yet.

  • fixed/variable
  • expand/shrink
  • frequency tracking
  • monotonic deque
  • recognition and limitations

Builds toward