Why my Solution passes 51/106 Test Cases.
Fails on:\nInput: [1,1,7,10,8,17,10,20,2,10]\nOutput: false\nExpected: true\n\n\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n       
```Fails on:```\nInput: [1,1,7,10,8,17,10,20,2,10]\nOutput: false\nExpected: true\n\n```\nclass Solution {\npublic:\n    bool stoneGameIX(vector<int>& stones) {\n        int n = stones.size();\n        int sum=0;\n        \n        for(int i=0; i<n; i++)\n        {\n            int begin=0;\n            while(begin<stones.size() && (sum+stones[begin])%3==0)\n            {\n                begin++;\n            }\n            if(begin==stones.size())return i%2==0 ? false : true;\n            sum+=stones[begin];\n            stones.erase(stones.begin()+begin);\n        }\n        return false;\n    }\n};\n```\n\n
[]