
Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Think about how the final string will look like.
It will either start with a '0' and be like '010101010..' or with a '1' and be like '10101010..'
Try both ways, and check for each way, the number of changes needed to reach it from the given string. The answer is the minimum of both ways.