T.C /O(n) and S.C /O(1) | C++ 🔥
Code
# Code
```cpp []
class Solution {
public:
    int furthestDistanceFromOrigin(string moves) {
        int countL = 0, countR = 0, count_ = 0;

        for (int i = 0; i < moves.length(); ++i) {
            if (moves[i] == 'L') {
                countL++;
            } else if (moves[i] == 'R') {
                countR++;
            } else {
                count_++;
            }
        }

        return abs(countL - countR) + count_;
    }
};
```
['String', 'Counting', 'C++']