Get Max Occurrences

Get Max Occurrences is a coding interview problem from Ibm interviews. Given a string and parameters minLength, maxLength, and maxUnique, determine the maximum frequency of any substring whose length falls within the range and has at most maxUnique distinct characters. A clear interview question focused on substring frequency and constraints.

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: