Short & Concise | C++
\nclass Solution {\npublic:\n    bool canTransform(string s, string e) {\n        int i = 0, j = 0, n = s.size(), m = e.size();\n        while(i < n || j < m) {
```\nclass Solution {\npublic:\n    bool canTransform(string s, string e) {\n        int i = 0, j = 0, n = s.size(), m = e.size();\n        while(i < n || j < m) {\n            while(s[i] == \'X\') i++;\n            while(e[j] == \'X\') j++;\n\n            if(s[i] != e[j]) return false;\n            if(s[i] == \'R\' && i > j) return false;\n            if(s[i] == \'L\' && i < j) return false; \n            i++, j++;\n        }\n        return true;\n    }\n};\n```
['Two Pointers', 'C++']