Short 1-liner Python Java Ruby
Ruby:\n\ndef minimum_moves(s)\n  s.scan(/X.?.?/).size\nend\n\n\nPython:\n\ndef minimumMoves(self, s: str) -> int:\n    return subn(\'X.?.?\', \'\', s)[1]\n\n\nJ
Ruby:\n```\ndef minimum_moves(s)\n  s.scan(/X.?.?/).size\nend\n```\n\nPython:\n```\ndef minimumMoves(self, s: str) -> int:\n    return subn(\'X.?.?\', \'\', s)[1]\n```\n\nJava:\n```\npublic int minimumMoves(String s) {\n    return s.replaceAll("O*(X?).?.?", "$1").length();\n}\n```
[]