Easy to understand.
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach Using Loop.\n Describe your approach to solving the problem. \n\n# Complex
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach Using Loop.\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity: O(n)\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity: O(1)\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\n    public boolean winnerOfGame(String colors) {\n        int n = colors.length();\n        int aliceCount = 0;\n        int bobCount = 0;\n\n        for (int i = 1; i < n - 1; i++) {\n            if (colors.charAt(i - 1) == \'A\' && colors.charAt(i) == \'A\' && colors.charAt(i + 1) == \'A\') {\n                aliceCount++;\n            } else if (colors.charAt(i - 1) == \'B\' && colors.charAt(i) == \'B\' && colors.charAt(i + 1) == \'B\') {\n                bobCount++;\n            }\n        }\n\n        return aliceCount > bobCount;\n    }\n}\n\n```
['Java']