Easy Java Solution ||  Beats 100% || 🚀🚀 || 🔥🔥
IntuitionApproachComplexity
Time complexity: O(N)

Space complexity: O(1)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: O(N)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```java []
class Solution {
    public int furthestDistanceFromOrigin(String moves) {
        
        int n = moves.length();
        int countTurn = 0;
        int countSpace = 0;

        for(char ch:moves.toCharArray()){
            if(ch == 'L') countTurn--;
            else if(ch == 'R') countTurn++;
            else countSpace++;
        }

        int turn = Math.abs(countTurn);
        return turn+countSpace;
    }
}
```
['Java']