LOL String
Computer Science Level 3Chris has a binary string. He wants to remove the substring 101
because it looks a lot like a lol message. To do so he can make a switch operation (change 0 to a 1 or vice versa). What is the minimum number of switches Chris has to do on the string so he can remove all the substrings?
Details and Assumptions
If Chris is given the string 1010101
the minimum number of swich operations would be 2.
1 2 3 

Your answer seems reasonable.
Find out if you're right!
Sign up to access problem solutions.
That seems reasonable.
Find out if you're right!
Already have an account? Log in here.