faster than 100% solutions :)
class Solution {\npublic:\n    int minimumMoves(string s) {\n        int cnt=0;\n        int i=0;\n        for(i=0;i<s.length();i++){\n            if(s[i]==\'O\
class Solution {\npublic:\n    int minimumMoves(string s) {\n        int cnt=0;\n        int i=0;\n        for(i=0;i<s.length();i++){\n            if(s[i]==\'O\') continue;\n            else break;\n        }\n        for(int j=i;j<s.length();j++){\n            if(s[j]==\'O\') continue;\n            int a=0;\n            if(s[j]==\'X\'){\n                s[j]=\'O\';\n                a++;\n            }\n            if(j+1<=s.length())\n            if(s[j+1]==\'X\'){\n                s[j+1]=\'O\';\n                a++;\n            }\n            if(j+2<=s.length())\n            if(s[j+2]==\'X\'){\n                s[j+2]=\'O\';\n                a++;\n            }\n            if(a) cnt++;\n            j+=2;\n        }\n        return cnt; \n    }\n};
[]