Replace every '!' in a binary string with 0 or 1 so that the weighted count of 01 and 10 pairs is as small as possible.
Replace every '!' in a binary string with 0 or 1 so that the weighted count of 01 and 10 pairs is as small as possible.
Opens with the full question.