Simple C++ 0ms
IntuitionApproachComplexity
Time complexity:

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

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

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

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

# Code
```cpp []
class Solution {
public:
    int furthestDistanceFromOrigin(string moves) {
        int sum1 = 0;
        int sum2 = 0;
        for (int i = 0; i < moves.length(); i++) {
            if(moves[i] == 'L')
            {
                sum1--;
                sum2--;

            }
            else if(moves[i] == 'R')
            {
                sum1++;
                sum2++;
            }
            else
            {
                sum1--;
                sum2++;
            }

        }
        sum2 = abs(sum2);
        sum1 = abs(sum1);
        
        return (sum2 > sum1) ? sum2 : sum1;
    }
};
```
['C++']