✅ C++ Easy Solution || Beats 96% of Users🔥🔥🔥
\n# Code\n\nclass Solution {\npublic:\n    bool winnerOfGame(string c) {\n        int a=0;\n        int b=0;\n        for(int i=1;i<c.length()-1;i++){\n        
\n# Code\n```\nclass Solution {\npublic:\n    bool winnerOfGame(string c) {\n        int a=0;\n        int b=0;\n        for(int i=1;i<c.length()-1;i++){\n            if(c[i+1]==c[i] && c[i-1]==c[i] && c[i]==\'A\'){\n                a++;\n            }\n            else if(c[i+1]==c[i] && c[i-1]==c[i] && c[i]==\'B\'){\n                b++;\n            }\n        }\n        if(a==0){\n            return false;\n        }\n        if(a>b){\n            return true;\n        }\n        else{\n            return false;\n        }\n    }\n};\n```
['Game Theory', 'C++']