Fast way to solve the problem with O(n) time, O(1) space
Approach\njust imagine of 2 pointer on the left i-1 and right i+1 and sum byte of character to be 195 or 198 and then count it if countA > countB alice should b
# Approach\njust imagine of 2 pointer on the left i-1 and right i+1 and sum byte of character to be 195 or 198 and then count it if countA > countB alice should be won\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```\nconst A byte = 195 // ascii 65*3\nconst B byte = 198 // ascii 66*3\n\nfunc winnerOfGame(colors string) bool {\n    countA := 0\n    countB := 0\n\n    for i := 1; i < len(colors); i++ {\n        if i+1 > len(colors)-1 {\n            break\n        }\n        added := colors[i-1]+colors[i]+colors[i+1]\n        switch added {\n            case 195: countA++\n            case 198: countB++\n            default: continue\n        }\n    }\n\n    return countA > countB\n}\n```\n\n![image.png](https://assets.leetcode.com/users/images/ba0004fa-7c0c-4866-bd51-7c2218bb4116_1697620122.569614.png)\n
['Go']