Medium problem made easy! JavaScript solution (Slow though)
Intuition\nThe problem seems to involve counting the number of consecutive sequences of the same color ("A" or "B") and determining the winner based on these co
# Intuition\nThe problem seems to involve counting the number of consecutive sequences of the same color ("A" or "B") and determining the winner based on these counts.\n\n# Approach\nWe can traverse the input string, keeping track of consecutive occurrences of each color ("A" or "B"). We\'ll count the number of each instance of three consecutive "A"s and "B"s. Finally, we\'ll compare these counts and determine the winner based on the larger count.\n\n# Complexity\n- Time complexity:\nO(n), where n is the length of the input string.\n\n- Space complexity:\nO(1), as we are using a constant amount of extra space regardless of the input size.\n\n# Code\n```\n/**\n * @param {string} colors\n * @return {boolean}\n */\nvar winnerOfGame = function(colors) {\n let alice = 0; // Counter for three consecutive "A"s\n  let bob = 0;   // Counter for three consecutive "B"s\n  \n  // Traverse the string and count consecutive occurrences of "A" and "B"\n  for (let i = 0; i < colors.length; i++) {\n    const element = colors[i];\n    const prevEl = colors[i - 1];\n    const nextEl = colors[i + 1];\n    \n    if (element === "A" && prevEl === "A" && nextEl === "A") {\n      alice++;\n    }\n    if (element === "B" && prevEl === "B" && nextEl === "B") {\n      bob++;\n    }\n  }\n  \n  return alice > bob;\n};\n```
['JavaScript']