Flipping zeros at distance " d "
i = 0 NEW_LINE while ( i < n and m > 0 ) : NEW_LINE INDENT m -= 1 NEW_LINE i += d NEW_LINE DEDENT if m == 0 : NEW_LINE INDENT return True NEW_LINE DEDENT return False NEW_LINE