C++ | Greedy Approach
Hint 2 : Try delaying a move as long as possible.\nExplanation : We can ignore \'O\' as long as possible.\n\t\t\t\t\t\t\t  When we encounter \'X\' we have to co
**Hint 2 : Try delaying a move as long as possible.**\n**Explanation** : We can ignore \'O\' as long as possible.\n\t\t\t\t\t\t\t  When we encounter \'X\' we have to count that as a move. \n\t\t\t\t\t\t\t  \n```\nint minimumMoves(string s) {\n        int move = 0;\n        int i=0;\n        while(i<s.size()){\n            if(s[i]==\'X\'){\n                i+=3;\n                move++;\n            } \n            else i+=1;\n        }\n        return move;\n    }\n
[]