✅ JavaScript - 94%, one pass, O(n)
Approach\n Describe your approach to solving the problem. \nWe can count the result of the game before the start because any turn of one player can\'t add new p
# Approach\n<!-- Describe your approach to solving the problem. -->\nWe can count the result of the game before the start because any turn of one player can\'t add new possible turns to another player. We count amount of possible turns for A and B in one pass, then compare it.\n\nTime complexity: $$O(n)$$.\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\n/**\n * @param {string} colors\n * @return {boolean}\n */\nvar winnerOfGame = function(colors) {\n    let countA = 0;\n    let countB = 0;\n\n    for (let i = 1; i < colors.length - 1; i++) {\n        countA += colors[i - 1] === \'A\' &&\n                  colors[i] === \'A\' &&\n                  colors[i + 1] === \'A\';\n        \n        countB += colors[i - 1] === \'B\' &&\n                  colors[i] === \'B\' &&\n                  colors[i + 1] === \'B\';\n    }\n\n    return countA > countB;\n};\n```
['JavaScript']