Function that finds the minimum number of flips to make the binary string alternating if left circular rotation is allowed
def MinimumFlips ( s , n ) : NEW_LINE INDENT a = [ 0 ] * n NEW_LINE for i in range ( n ) : NEW_LINE INDENT a [ i ] = 1 if s [ i ] == '1' else 0 NEW_LINE DEDENT DEDENT