2209. Number of Equal Count Substrings

Medium
Hash Table
String
Sliding Window
Counting

Description

Hints

Hint 1
The brute force solution is to check every substring, which would TLE. How can we improve this solution?
Hint 2
In an equal count substring, the first character appears count times, the second character appears count times, and so on.
Hint 3
The length of an equal count substring is the number of unique characters multiplied by count.
Hint 4
The length of all equal count substrings are multiples of count.

Statistics

Acceptance
45.1%
Submissions
8,614
Accepted
3,888