#3714

Longest Balanced Substring II

expert · 1005 · lc medium +32 · 42% accepted · 555 likes · top 23%

Description

Given a string s consisting only of 'a', 'b', and 'c', return the length of the longest substring in which all present characters appear with equal frequency.

Code

1
2
3