Java
\nclass Solution {\n    public int furthestDistanceFromOrigin(String moves) { \n        int countL = 0, countR = 0, countSpace = 0;\n        \n        for(int i
```\nclass Solution {\n    public int furthestDistanceFromOrigin(String moves) { \n        int countL = 0, countR = 0, countSpace = 0;\n        \n        for(int i = 0; i < moves.length(); i++) {\n            if(moves.charAt(i) == \'L\') countL++;\n            else if(moves.charAt(i) == \'R\') countR++;\n            else countSpace++;\n        }\n        \n        if(countL > countR) return countL + countSpace - countR;\n        return countR + countSpace - countL;\n    }\n}\n```
['Java']