You are given a binary string
s.A prefix of
sis considered valid if its characters can be rearranged to form an alternating string.Return the number of valid prefixes of
s.A string is considered alternating if no two adjacent characters are equal.
1 | class Solution { |