Maintain 1 score Greedy
Intuition\nWe do not need to maintain two scores. Only one alice_over_bob is enough.\n\n\n# Approach\n Describe your approach to solving the problem. \n\n# Comp
# Intuition\nWe do not need to maintain two scores. Only one `alice_over_bob` is enough.\n\n\n# Approach\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    fun winnerOfGame(colors: String): Boolean {\n        var alice_over_bob = 0\n        for(i in 1 until colors.length - 1)\n            if (colors[i - 1] == colors[i] && colors[i + 1] == colors[i])\n                alice_over_bob += if(colors[i] == \'A\') 1 else -1\n        return alice_over_bob > 0\n    }\n}\n```
['Kotlin']