You are given a string s.
You can perform the following operation on the string any number of times:
Choose an index i in s such that there is at least one identical character to the left of i and at least one identical character to the right of i.
Remove the closest identical character to the left of i.
Remove the closest identical character to the right of i.
Return the minimum possible length of s that can be achieved after performing any number of operations.
Constraints:
s.length
s consists only of lowercase English letters.
You are given a string s.
You can perform the following operation on the string any number of times:
Choose an index i in s such that there is at least one identical character to the left of i and at least one identical character to the right of i.
Remove the closest identical character to the left of i.
Remove the closest identical character to the right of i.
Return the minimum possible length of s that can be achieved after performing any number of operations.
Constraints:
s.length
s consists only of lowercase English letters.