Simple C++ Solution || O(n)
\nclass Solution {\npublic:\n    bool winnerOfGame(string colors) \n    {\n        int a=0,b=0;\n        if(colors.size()<3)\n            return false;\n       
```\nclass Solution {\npublic:\n    bool winnerOfGame(string colors) \n    {\n        int a=0,b=0;\n        if(colors.size()<3)\n            return false;\n        for(int i=0;i<colors.size()-2;i++)\n        {\n            if(colors[i]==\'A\' and colors[i+1]==\'A\' and colors[i+2]==\'A\')\n                a++;\n            if(colors[i]==\'B\' and colors[i+1]==\'B\' and colors[i+2]==\'B\')\n                b++;\n        }\n        return a>b;\n    }\n};\n```
['C']