C++
TLE COMING CAN SOMEONE HELP \n\'\'\'\nint startZero(string s)\n    {\n        int count = 0 ;\n        for(int i = 0 ; i < s.length() ; i++)\n        {\n       
TLE COMING CAN SOMEONE HELP \n\'\'\'\nint startZero(string s)\n    {\n        int count = 0 ;\n        for(int i = 0 ; i < s.length() ; i++)\n        {\n            if(i%2 == 0)\n            {\n                if(s[i] == \'1\')\n                {\n                    //s[i] = \'0\';\n                    count++;\n                }            \n            }\n            else\n            {\n                if(s[i] == \'0\')\n                {\n                    count++;\n                    //s[i] = \'1\';\n                }\n            }\n        }\n        return count;\n    }\n    int startOne(string s)\n    {\n        int count = 0 ;\n        for(int i = 0 ; i < s.length() ; i++)\n        {\n            if(i%2 == 0)\n            {\n                if(s[i] == \'0\')\n                {\n                    //s[i] = \'1\';\n                    count++;\n                }            \n            }\n            else\n            {\n                if(s[i] == \'1\')\n                {\n                    count++;\n                    //s[i] = \'0\';\n                }\n            }\n        }\n        return count;\n    }\n    \n\n    int minFlips(string s) {\n        string s1 = s + s;\n        //cout<<"s1 is "<<s1<<endl; \n        int n = s.length();\n        //cout<<"n is "<<n<<endl; \n        vector<string> v;\n        int start = 0 ;\n        int end = n ;\n        int i = 0 ;\n        int ans = INT_MAX ;\n        for(start = 0 ; start < n ; start++)\n        {\n            int x1 = 0 ;\n            int x2 = 0 ;\n            x1 = startZero(s1.substr(start,n));\n            x2 = startOne(s1.substr(start,n));\n            ans = min(ans,min(x1,x2));\n        }\n        return ans;\n        \n    }\n\'\'\'
[]