3746. Minimum String Length After Balanced Removals
You are given a string
sconsisting only of the characters'a'and'b'.You are allowed to repeatedly remove any substring where the number of
'a'characters is equal to the number of'b'characters. After each removal, the remaining parts of the string are concatenated together without gaps.Return an integer denoting the minimum possible length of the string after performing any number of such operations.
1 | class Solution { |