Simple java code 0 ms beats 100 %
\n# Complexity\n-\n\n# Code\n\nclass Solution {\n    public int minimumMoves(String s) {\n        char[] ch=s.toCharArray();\n        int ctr=0;\n        for(in
\n# Complexity\n-\n![image.png](https://assets.leetcode.com/users/images/fc490b4e-89c0-4ecf-a32a-e0c1c1c6c910_1704898978.7593596.png)\n# Code\n```\nclass Solution {\n    public int minimumMoves(String s) {\n        char[] ch=s.toCharArray();\n        int ctr=0;\n        for(int i=0;i<ch.length;i++)\n        {\n            if(ch[i]==\'X\')\n            {\n                i+=2;\n                ctr++;\n            }\n        }\n        return ctr;\n    }\n}\n```
['Java']