Given a binary string s, return the total number of prefixes of s that can be rearranged to form an alternating binary string.
An alternating string is defined as a string where no two adjacent characters are identical.
Constraints:
s.length
s consists only of the characters
Given a binary string s, return the total number of prefixes of s that can be rearranged to form an alternating binary string.
An alternating string is defined as a string where no two adjacent characters are identical.
Constraints:
s.length
s consists only of the characters