[Python 3] Simple Solution O(n) with Explanation
General idea:\n\nGo through each character. if it\'s X, then we count once and jump to 3 characters ahead; if it\'s O, then we ignore it and go on. In this way,
General idea:\n\nGo through each character. if it\'s X, then we count once and jump to 3 characters ahead; if it\'s O, then we ignore it and go on. In this way, we count all the moves.\n\n```\ndef minimumMoves(self, s: str) -> int:\n        res, i = 0, 0\n        while i < len(s):\n            if s[i] == \'X\':\n                i += 3\n                res += 1\n            else:\n                i += 1\n        return res
['Python']