Given a binary string s, return the minimum number of character swaps required to transform s into an alternating string, or
A string is called alternating if no two adjacent characters are equal. In a single swap, you can choose any two characters in s and swap their positions.
Constraints:
s.length
s[i] is either '0' or '1'.
Given a binary string s, return the minimum number of character swaps required to transform s into an alternating string, or
A string is called alternating if no two adjacent characters are equal. In a single swap, you can choose any two characters in s and swap their positions.
Constraints:
s.length
s[i] is either '0' or '1'.