We’re preparing your current view and syncing the latest data.
You are given a binary string s. You need to find the minimum number of changes required to make the string alternating. A string is alternating if no two adjacent characters are equal. For example, '0101' or '1010' are alternating strings. Changes consist of flipping a character from '0' to '1' or from '1' to '0'.
A single string s consisting only of '0' and '1' characters.
An integer representing the minimum number of character flips to make s alternating.
1 <= s.length <= 10^5