Javascript one pass O(n) runtime, O(1) space
\nvar canChange = function (start, target) {\n    let l = 0\n    let r = 0\n\n    for (let i = 0; i < start.length; i++) {\n        if (start[i] === "R") r++\n 
```\nvar canChange = function (start, target) {\n    let l = 0\n    let r = 0\n\n    for (let i = 0; i < start.length; i++) {\n        if (start[i] === "R") r++\n        if (start[i] === "L") l--\n\n        /**\n         * If we encountered L and there is R that has not reached the target,\n         * then we know that this L is blocking the way\n         */\n        if (target[i] === "L" && r > 0) return false\n        if (start[i] === "L" && r > 0) return false\n\n        if (target[i] === "L") l++\n        if (target[i] === "R") r--\n\n        if (l < 0 || r < 0) return false\n    }\n\n    /**\n     * Final l and r count must be zero\n     */\n    return !l && !r\n\n};\n```
['JavaScript']