c++ solution || With Approach || Faster than 100%
APPROACH\ninitilize i=0(iterator), result=0;\niterate string s using while loop till the size of string s \nin string s if we found "X" at any index we will inc
**APPROACH**\ninitilize i=0(iterator), result=0;\niterate string s using while loop till the size of string s \nin string s if we found "X" at any index we will increase iterator by 3 and result by 1\nif we found "O" then increase iterator by 1 \nreturn result\n```\nclass Solution {\npublic:\n    int minimumMoves(string s) \n    {\n        int n=s.length(),res=0,i=0;\n        while(i<n)\n        {\n            if(s[i]==\'X\')\n            {\n                i+=3;\n                res++;\n            }\n            else\n                i++;\n        }\n        return res;\n    }\n};\n```\n**Plz upvote if it helps**\n![image](https://assets.leetcode.com/users/images/54f32a72-4219-48c9-acb1-7e8c38b4e5d8_1653671028.9541156.png)\n\n
[]