Solution with Map
IntuitionTrack the freq of the chacracter and put it in map.ApproachMax movement will be absolute value of left- right plus the no of '_'Complexity
Time complex
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
Track the freq of the chacracter and put it in map.

# Approach
<!-- Describe your approach to solving the problem. -->
Max movement will be absolute value of left- right plus the no of '_'

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

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

# Code
```java []
class Solution {
    public int furthestDistanceFromOrigin(String moves) {
        
        HashMap<Character,Integer> map=new HashMap<>();
        map.put('L',0);
        map.put('R',0);
        map.put('_',0);
        for(char ch:moves.toCharArray()){
            map.put(ch,map.getOrDefault(ch,0)+1);
        }

        return map.get('_')+Math.abs(map.get('L')-map.get('R'));

    }
}
```
['Java']