<garvit244>926_1.py
def minFlipsMonoIncr( S):
    ones = [0]
    for char in S:
        ones.append(ones[-1] + int(char))
    result = float('inf')
    for index in range(len(ones)):
        zeroes = len(S) - index - (ones[-1]-ones[index])
        result = min(zeroes+ones[index], result)
    return result
def sample_funcname ( var_0 ) :
    var_2 = [ 0 ]
    for var_3 in var_0 :
        var_2.append ( var_2 [ - 1 ] + int ( var_3 ) )
    var_9 = float ( 'inf' )
    for var_12 in range ( len ( var_2 ) ) :
        var_13 = len ( var_0 ) - var_12 - ( var_2 [ - 1 ] - var_2 [ var_12 ] )
        var_9 = min ( var_13 + var_2 [ var_12 ] , var_9 )
    return var_9
