Java | While Loop | Simple Logic
\nclass Solution {\n    public int minimumMoves(String s) {\n        int i=0,step=0;\n        while(i<s.length()){\n            if(s.charAt(i)==\'X\'){\n       
```\nclass Solution {\n    public int minimumMoves(String s) {\n        int i=0,step=0;\n        while(i<s.length()){\n            if(s.charAt(i)==\'X\'){\n                i=i+3;\n                step++;\n            }\n            else\n                i++;\n        }\n        return step;\n    }\n}\n```\nKindly upvote if you like the code.
['String', 'Java']