[C++] & [Python] || O(N)|| Easy to understand
C++\n\nclass Solution {\npublic:\n    bool winnerOfGame(string colors) {\n        int l = colors.length();\n        int ca=0, cb=0;\n        if(l<3) return fals
**C++**\n```\nclass Solution {\npublic:\n    bool winnerOfGame(string colors) {\n        int l = colors.length();\n        int ca=0, cb=0;\n        if(l<3) return false;\n        for(int i=0; i<=l-3; ++i){\n            if(colors[i]==colors[i+1] && colors[i+1]==colors[i+2]){\n                if(colors[i] == \'A\') ca++;\n                else cb++;\n            }\n        }\n        return ca>cb;\n    }\n};\n```\n**Python3**\n```\nclass Solution:\n    def winnerOfGame(self, colors: str) -> bool:\n        l = len(colors)\n        ca, cb =0, 0\n        if(l<3): return False\n        for i in range(l-2):\n            if(colors[i]==colors[i+1] and colors[i+1]==colors[i+2]):\n                if(colors[i] == \'A\'): ca += 1\n                else: cb += 1\n        return ca>cb\n```
['C', 'Python']