C++ Solution
Complexity\n- Time complexity:\n Add your time complexity here, e.g. O(n) \n    O(N)\n\n- Space complexity:\n Add your space complexity here, e.g. O(n) \n    O(
# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n    O(N)\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n    O(1)\n\n# Code\n```\nclass Solution {\npublic:\n    bool winnerOfGame(string colors) {\n        int alice = 0, bob = 0;\n        for(int i = 1; i < colors.size() - 1; i++) {\n            if(colors[i - 1] == \'A\' && colors[i] == \'A\' && colors[i + 1] == \'A\') alice++;\n            if(colors[i - 1] == \'B\' && colors[i] == \'B\' && colors[i + 1] == \'B\') bob++;\n        }\n        if(alice > bob) return true;\n        else return false;\n    }\n};\n```
['C++']