#3_Line Solution For Begginers simple One With explanation ✔️✔️✅
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\ncount the Alice\'s play and Bob\'s play is alice\'s turn is greater then 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\ncount the Alice\'s play and Bob\'s play is alice\'s turn is greater then he win else he lose the game \n# Complexity\n- Time complexity:\n $$O(n)$$ -\n\n- Space complexity:\n$$O(1)$$ \n\n# Code\n```\nclass Solution {\npublic:\n    bool winnerOfGame(string c) {\n        int cnt1=0,cnt2=0;\n        for(int i=1;i<c.size()-1;i++){\n            if(c[i-1]==\'A\' &&c[i]==\'A\' && c[i+1]==\'A\') cnt1++;\n             if(c[i-1]==\'B\' &&c[i]==\'B\' && c[i+1]==\'B\') cnt2++;\n        }\n         return cnt1>cnt2;\n    }\n};\n```
['C++']