Skip to content
CCC Python Course

Sliding windows with counts

Stage
5
Module
M5.3
Lessons
1

In this module

  • Maintain letter counts in a fixed-length window in O(1) per step.
  • Track matching windows with a "matches" counter.
  • Implement variable-length windows maintaining distinct elements.

Before this module

Lessons

  1. 1Sliding windows with counts

Practice

Try this on the judge. The link opens the problem on DMOJ.

  1. 2020 S3
    Searching for Strings (opens on DMOJ in a new tab) DMOJ

    Find windows that are permutations of a target string using a fixed-length sliding window.