Easy to understand | O(n)
Please , Upvote if you understand\n```\nclass Solution {\npublic:\n    bool canChange(string s, string t) {\n        string a="",b="";\n        vector pos1,pos2
Please , Upvote if you understand\n```\nclass Solution {\npublic:\n    bool canChange(string s, string t) {\n        string a="",b="";\n        vector<int> pos1,pos2;\n        for(int i=0;i<s.length();i++)\n        {\n            if(s[i]!=\'_\')\n            {\n                a+=s[i];\n                pos1.push_back(i);\n            }\n        }\n         for(int i=0;i<t.length();i++)\n        {\n            if(t[i]!=\'_\')\n            {\n                b+=t[i];\n                pos2.push_back(i);\n            }\n        }\n        if(a!=b)\n            return false;\n        for(int i=0;i<a.size();i++)\n        {\n            if(a[i]==\'L\')\n            {\n                if(pos1[i]<pos2[i])return false;\n            }\n            else\n            {\n                if(pos1[i]>pos2[i])return false;\n            }\n        }\n        return true;\n    }\n};
['C']