← ALL NOTES
Hash Table

3714. Longest Balanced Substring II

A string s of only characters 'a','b','c'. A substring is balanced if all its distinct characters occur the same number of times. Find the length of the longest balanced substring (for large n).

Loading…