O(N) Solution
\npublic boolean canChange(String start, String target) {\n        int l=0,r=0,n=start.length();\n        for(int i=0;i<n;i++){\n            if(start.charAt(i)=
```\npublic boolean canChange(String start, String target) {\n        int l=0,r=0,n=start.length();\n        for(int i=0;i<n;i++){\n            if(start.charAt(i)==\'L\') {\n                l++;\n                if(r>0) return false;\n            }\n            else if(start.charAt(i)==\'R\') r++;\n            if(target.charAt(i)==\'L\') l--;\n            else if(target.charAt(i)==\'R\') r--;\n            if(l>0) return false;\n            if(r<0) return false;\n        }\n        return l==0&&r==0;\n    }\n```
['Java']