Flip String to Monotone Increasing (LeetCode 926): minimum flips to make a binary string monotone increasing.
Asked in the phone interview stage.
Implement min_flips_mono_incr(s). Given a non-empty string s containing only 0 and 1, return the minimum number of character flips needed so that all 0s appear before all 1s. A flip changes one character.
Examples: s = "00110" returns 1; s = "010110" returns 2.
def min_flips_mono_incr(s):