Python || easy sliding window based solutiion
so first of all basic idea is that we add s at the back because for every possible s that is a n length piece\n   we try to see what no changes it req for that 
*  so first of all basic idea is that we add s at the back because for every possible s that is a n length piece\n*   we try to see what no changes it req for that we make it 2n length now we make to dummty strings s1 and s2 as only two alternative are available .... one starts with one 10101 and another starts with 01010101 \n* . so now start for loop with i if s1[i]!=s[i] then we want a change so we increase ans1 by + 1  now if we reach n-1 index we have a n lenrtgh string so we check with ans what if we got a min answer so ans1 ans2 and ans are compared and minimum value stored in ans\n*  ....now we go to n th index now we remove the first index i=0 from s but we check if that index was earlier if  changed \n* then we did ans-=1 so as to nullify its effect in ans so wo a new ans1 and ans2\nfor this n len string from index 1 to n and so on we go to n+1 then we remove 2 nd index element ...and so on and \n* we return ans at end which is min of all iterations\n**if u like the explanation plz do upvote it ..**\n\n```py\nclass Solution(object):\n    def minFlips(self, s):\n        n=len(s) # we save this length as it is length of window\n        s+=s #we add this string because we can have any possibility like s[0]->s[n-1] or s[2]->s[n+1]meaning is that any continous variation with n length ... \n        ans=sys.maxint #assiging the answer max possible value as want our answer to be minimum so while comparing min answer will be given \n        ans1,ans2=0,0#two answer variables telling amount of changes we require to make it alternative\n        s1=""#dummy string like 10010101\n        s2=""#dummy string like 01010101\n        for i in range(len(s)):\n            if i%2==0:\n                s1+="1"\n                s2+="0"\n            else :\n                s1+="0"\n                s2+="1"\n        for i in range(len(s)):\n            if s[i]!=s1[i]:#if they dont match we want a change so ++1\n                ans1+=1\n            if s[i]!=s2[i]:\n                ans2+=1\n            \n            if i>=n:\n                if s[i-n]!=s1[i-n]:#now we have gone ahead so removing the intial element but wait if that element needed a change we added ++ earlier but now he is not our part so why we have his ++ so to nullify its ++ we did a -- in string\n                    ans1-=1\n                if s[i-n]!=s2[i-n]:\n                    ans2-=1\n            if i>=n-1#when i reaches n-1 we have n length so we check answer first time and after that we always keep seeing if we get a less answer value and after the loop we get \n                ans=min([ans,ans1,ans2])\n        return ans          \n
['Sliding Window', 'Python', 'Python3']