Given a string s consisting only of the characters 'a', 'b', and 'c', return the length of the longest balanced substring in s.
A substring is considered balanced if all distinct characters that appear within it have the same frequency.
Constraints:
s.length
s contains only the characters 'a', 'b', and 'c'.
Given a string s consisting only of the characters 'a', 'b', and 'c', return the length of the longest balanced substring in s.
A substring is considered balanced if all distinct characters that appear within it have the same frequency.
Constraints:
s.length
s contains only the characters 'a', 'b', and 'c'.