Easy to understand JavaScript solution
\tvar canTransform = function(start, end) {\n\t\tlet L = R = 0;\n\n\t\tfor (let index = 0; index < start.length; index++) {\n\t\t\tstart[index] === \'R\' && R++
\tvar canTransform = function(start, end) {\n\t\tlet L = R = 0;\n\n\t\tfor (let index = 0; index < start.length; index++) {\n\t\t\tstart[index] === \'R\' && R++;\n\t\t\tend[index] === \'L\' && L++;\n\t\t\tif (R > 0 && L > 0) return false;\n\n\t\t\tstart[index] === \'L\' && L--;\n\t\t\tend[index] === \'R\' && R--;\n\t\t\tif (L < 0 || R < 0) return false;\n\t\t}\n\t\treturn L === 0 && R === 0;\n\t};
['JavaScript']