C++ Solution
\n\nclass Solution {\npublic:\n    int furthestDistanceFromOrigin(string m) {\n        int l=0,r=0,u=0;\n        for(int i=0;i<m.size();i++)\n        {\n       
\n```\nclass Solution {\npublic:\n    int furthestDistanceFromOrigin(string m) {\n        int l=0,r=0,u=0;\n        for(int i=0;i<m.size();i++)\n        {\n            if(m[i]==\'L\')\n                l++;\n            else if(m[i]==\'R\')\n                r++;\n            else\n                u++;\n        }\n        return u+abs(l-r);\n    }\n};\n```
['C++']