Simple Java two-pointers solution (no replace( ), no equals(), no StringBuilder)
\nclass Solution {\n    public boolean canTransform(String start, String end) {\n        \n        int p1=0, p2=0;\n        \n        while(p1 < start.length() 
```\nclass Solution {\n    public boolean canTransform(String start, String end) {\n        \n        int p1=0, p2=0;\n        \n        while(p1 < start.length() || p2 < end.length()) {\n            while(p1 < start.length() && start.charAt(p1) == \'X\')\n                p1++;\n            while(p2 < end.length() && end.charAt(p2) == \'X\')\n                p2++;\n            \n            if(p1 >= start.length() && p2 >= end.length())\n                return true;\n            \n            if(p1 >= start.length() || p2 >= end.length())\n                return false;\n            \n            if(start.charAt(p1) != end.charAt(p2)) \n                return false;\n            \n            if(start.charAt(p1) == \'R\' && p1 > p2) {\n                return false;\n            }\n            \n            if(start.charAt(p1) == \'L\' && p1 < p2) {\n                return false;\n            }\n            \n            p1++;\n            p2++;\n        }\n        \n        return true;\n    }\n}\n```
['Two Pointers', 'Java']