C++||Two Pointers||Easy to Understand
```\nclass Solution {\npublic:\n    bool canTransform(string start, string end)\n    {\n        int n=start.size();\n        string s1,s2;\n        for(int i=0;
```\nclass Solution {\npublic:\n    bool canTransform(string start, string end)\n    {\n        int n=start.size();\n        string s1,s2;\n        for(int i=0;i<n;i++)\n        {\n            if(start[i]!=\'X\')\n                s1+=start[i];\n        }\n         for(int i=0;i<n;i++)\n        {\n            if(end[i]!=\'X\')\n                s2+=end[i];\n        }\n        if(s1!=s2)\n            return false;\n        for(int i=0,j=0;i<n&&j<n;)\n        {\n            while(i<n&&start[i]==\'X\')\n                i++;\n            while(j<n&&end[j]==\'X\')\n                j++;\n            if(start[i]==\'L\'&&i<j||start[i]==\'R\'&&i>j)\n                return false;\n            i++;\n            j++;\n        }\n        return true;\n        \n        \n    }\n};\n//if you like the solution plz upvote.
['Two Pointers', 'C']