JavaScript super clean, O(n)
js\n/**\n * @param {string} start\n * @param {string} end\n * @return {boolean}\n */\nvar canTransform = function(start, end) {\n  const N = start.length\n  let
```js\n/**\n * @param {string} start\n * @param {string} end\n * @return {boolean}\n */\nvar canTransform = function(start, end) {\n  const N = start.length\n  let i = 0\n  let j = 0\n  \n  while (i < N && j < N) {\n    while (start[i] === \'X\') i++\n    while (end[j] === \'X\') j++\n    \n    if (\n      (start[i] !== end[j]) || // chars don\'t match\n      (start[i] === \'R\' && i > j) || // Rs can\'t move forward!\n      (start[i] === \'L\' && i < j) // Ls can\'t move backward!\n    ) return false\n    \n    i++\n    j++\n  }\n  \n  return true\n};\n```
[]