Simple and Easy Soulution
\n Add your space complexity here, e.g. O(n) \n\n# Code\n\nclass Solution {\npublic:\n    int furthestDistanceFromOrigin(string moves) {\n        int lefts=0;\n
\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int furthestDistanceFromOrigin(string moves) {\n        int lefts=0;\n        int rights=0;\n        int choice=0;\n        for(auto a:moves){\n            if(a==\'R\')rights++;\n            else if(a==\'L\')lefts++;\n            else choice++;\n        }\n        (lefts>rights)?lefts+=choice:rights+=choice;\n        return abs(lefts-rights);\n    }\n};\n```
['C++']