Simple and Clean  C++ code
Intuition\nconcatinating s 2 times and checking for window of size n\n\n# Approach\ncounting number of 1\'s and 0\'s at even and odd places checking it for wind
# Intuition\nconcatinating s 2 times and checking for window of size n\n\n# Approach\ncounting number of 1\'s and 0\'s at even and odd places checking it for window of size n \n\n# Complexity\n- Time complexity:\nO(n)\n\n- Space complexity:\nO(1)\n\n# Code\n```\nclass Solution {\npublic:\n    int minFlips(string s) {\n        int n=s.size();\n        s+=s;\n        int i=0,j=0;\n        int ans=INT_MAX;\n        vector<vector<int>> v(2,vector<int>(2,0));\n        while(j<2*n){\n//counting number of 0\'s and 1\'s at even and odd positions\n            v[j%2][s[j]-\'0\']++;  \n\n//window of size n\n            if(j-i+1==n){\n\n//only two combinations are possible \n// 1:- 0 at even positions and 1 at odd positions\n// 2:- 1 at even positions and 0 at odd positions\n// keeping track of minimum possible answer\n\n\n    ans=min(ans,min(n-(v[0][1]+v[1][0]),n-(v[1][1]+v[0][0])));\n                v[i%2][s[i]-\'0\']--;\n                i++;\n            }\n        j++;\n        }\n        return ans;\n    }\n};\n```
['Sliding Window', 'Counting', 'C++']