Change the fewest bits in the even-length string s so that it can be divided into nonempty blocks, each with an even length and only one kind of bit. Different blocks may use different bits. Return the minimum number of changed positions.
Example 1:
Input: s = "00"
Output: 0Explanation: The whole string is one even-length block of equal bits, so no change is needed.
Example 2:
Input: s = "01"
Output: 1Explanation: Change either bit to make "00" or "11". The resulting length-2 block is valid.
Example 3:
Input: s = "10"
Output: 1Explanation: Change either bit to obtain "00" or "11". One change is enough, while the original unequal pair is invalid.
Constraints:
2 <= s.length <= 100000- Each character is
0or1. The length ofsis even.