Max Frequency Substring
Problem Overview
- Determine the maximum frequency of any substring whose length is within [minLength, maxLength] and has at most maxUnique distinct characters.
- Input: string s, integers minLength, maxLength, maxUnique; Output: integer frequency of the most frequent valid substring.
- Domain: string processing/text analytics; useful for log or token analysis scenarios.
- This coding interview problem is a Snowflake interview question.
Example
Unlock to view complete problem details
and practice with sample input/output
Was this article helpful?
View Test Cases & Run Code requires membership
Input Variables
Execution Result:
