Simple C++ if/else
I simply consider all the possible cases and logically handle them using if and else statement\nIf you have any doubt ask in comment section.\t\n\t\n\t\tbool st
I simply consider all the possible cases and logically handle them using if and else statement\nIf you have any doubt ask in comment section.\t\n\t\n\t\tbool stoneGameIX(vector<int>& stones) {\n        int n=stones.size();\n        int arr[3]={0};\n        for(int i=0;i<n;i++)\n            arr[stones[i]%3]++;\n        if(arr[0]%2==1)\n            if(abs(arr[1]-arr[2])>=3)return true;\n            else return false;\n        else\n            if(arr[1]==0 || arr[2]==0)return false;\n            else return true;\n        }
['C++']