Easy Solution in C++ .
IntuitionApproachWe are calculating the number of lefts , rights , underscores separately . If number of left is more than number of right then return left + un
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->
We are calculating the number of lefts , rights , underscores separately . If number of left is more than number of right then return left + underscore - right , otherwise return right + underscore - left .

# 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
```cpp []
class Solution {
public:
    int furthestDistanceFromOrigin(string moves) {
        int left = 0;
        int right = 0;
        int under_score = 0;
        for (int i = 0; i < moves.size(); i++) {
            if (moves[i] == 'L') {
                left++;
            } 
            else if (moves[i] == 'R') {
                right++;
            } 
            else if (moves[i] == '_') {
                under_score++;
            }
        }
        if (left > right) {
            return left + under_score - right;
        } 
        else {
            return right + under_score - left;
        }
    }
};
```
['C++']