Given a binary string, we can flip all 1
s and 0
s . Calculate the minimum flips required to make all 1
s in left and all 0
s in right. There should be at least one 0
and one 1
.
"1011000"
can be turned into "11110000"
with 1
flip.
"00001"
can be turned into "10000"
with 2
flips.