Python Solution using Sliding Window
Code\n\nclass Solution:\n    def winnerOfGame(self, colors: str) -> bool:\n        a=0\n        b=0\n        s=""\n        for i in range(len(colors)):\n       
# Code\n```\nclass Solution:\n    def winnerOfGame(self, colors: str) -> bool:\n        a=0\n        b=0\n        s=""\n        for i in range(len(colors)):\n            if(len(s)<3):\n                s+=colors[i]\n            else:\n                s=s[1:]+colors[i]\n            if(s==\'AAA\'):\n                a+=1\n            if(s==\'BBB\'):\n                b+=1\n        if(a>b):\n            return True\n        return False\n\n```
['Sliding Window', 'Python3']