Greedy Algo.
class Solution {\npublic:\n    int minimumMoves(string s) {\n    int ans = 0;\n    for (int i = 0; i < s.size(); i += s[i] == \'X\' ? 3 : 1)\n        ans += s[i
class Solution {\npublic:\n    int minimumMoves(string s) {\n    int ans = 0;\n    for (int i = 0; i < s.size(); i += s[i] == \'X\' ? 3 : 1)\n        ans += s[i] == \'X\';\n    return ans;\n}\n};
['Greedy', 'C']