(C++) 2027. Minimum Moves to Convert String
\n\nclass Solution {\npublic:\n    int minimumMoves(string s) {\n        int ans = 0; \n        for (int i = 0; i < s.size(); ++i) \n            if (s[i] == \'X
\n```\nclass Solution {\npublic:\n    int minimumMoves(string s) {\n        int ans = 0; \n        for (int i = 0; i < s.size(); ++i) \n            if (s[i] == \'X\') \n                ++ans, i += 2; \n        return ans; \n    }\n};\n```
['C']