Given a binary string s, the objective is to divide it into subsegments such that all bits into that segment is identical(i.e. either '0' or '1') and the subsegments should be of even length. Mathematically for any subsegment Bi ∈ s ⇒ len(Bi)%2==0 and ∀ j either Bij='0' or '1' . The criteria to achieve this: 1. This should be done in minimum number of flips required to form an Identical even subsegments. 2. And Minimize the total number of subsegments. Outpur the minimum number of subsegments.
NOTE: First you have to minimize the number of flips before minimizing subsegments.
Constraints are: 2<= s.size() <=10^5







