Function that finds the minimum number of flips to make the binary string alternating if left circular rotation is allowed
int MinimumFlips ( string s , int n ) { int a [ n ] ; for ( int i = 0 ; i < n ; i ++ ) { a [ i ] = ( s [ i ] == '1' ? 1 : 0 ) ; }