Given a binary string s, you may flip any character from 0 to 1 or from 1 to 0. Return the minimum number of flips needed so that the string is monotone increasing, meaning all 0s come before all 1s.
You've read your 3 free write-ups
Sign up free to keep reading. Your account opens the first 10 questions of every company.