you give binary string s you allow perform type operation stre sequenceType1 Remove character start stre s append end stringType2 Pick character s flip value ie value 0 1 viceversareturn minimum number type2 operation need perform s alternatingthe string call alternate adjacent character equalFor example string 010 1010 alternate string 0100 Example 1input s 111000output 2explanation Use operation times s 100011Then use second operation sixth element s 101010example 2input s 010output 0explanation the string alternatingexample 3input s 1110output 1explanation Use second operation second element s 1010 Constraints1 slength 105si 0 1