Easy C++ Solution || Better than 100% 🔥
\n\n# Code\n\nclass Solution {\npublic:\n    int furthestDistanceFromOrigin(string moves) {\n        int left = 0, right = 0, count = 0;\n        for(int i=0; i
\n\n# Code\n```\nclass Solution {\npublic:\n    int furthestDistanceFromOrigin(string moves) {\n        int left = 0, right = 0, count = 0;\n        for(int i=0; i<moves.size(); i++){\n            if(moves[i] == \'L\'){\n                left++;\n            }else if(moves[i] == \'R\'){\n                right++;\n            }else{\n                count++;\n            }\n        }\n        return max(left, right) - min(left, right) + count;\n    }\n};\n```
['C++']