Easy, 100%, Simple, JAVA,O(1) Solution
class Solution {\n     public int helper(String s) {\n          int n=s.length(),count=0,i=0;\n       while(i<n){\n           char ch=s.charAt(i);\n           i
class Solution {\n     public int helper(String s) {\n          int n=s.length(),count=0,i=0;\n       while(i<n){\n           char ch=s.charAt(i);\n           if(ch==\'X\'){\n               count++;\n               i+=3;\n           }\n          else{\n              i+=1;\n          }\n       }\n         return count;\n    }\n    public int minimumMoves(String s) {\n        return helper(s);\n    }\n}
[]