faster than 100.00%  | O(N) | (Java and C++)
I am ignoring all the empty _ charcater,\n\nAs soon as i encounter any character other then _ ,\nThen the characters must be same,\n\nif It is \'L\'\n then this
I am ignoring all the empty _ charcater,\n\nAs soon as i encounter any character other then _ ,\nThen the characters must be same,\n\nif It is \'L\'\n then this condition must hold j>= i , if in target string it found at index i and , in st string it found at J\n because we can move \'L\' charcater to left , means left in st string , \notherwise i should return fase;\n\nsame with \'R\'\nthen this condition must hold j<= i , if in target string it found at index i and , in st string it found at J\nbecause we can move \'R\' charcater to right ,means  right in st string , \notherwise i should return false;\n\n**Time complexityO(N)**\nbecause every time either i increase I , or J , or both\n\n**Space complexityO(1)**\n\n**Upvote if you find this solution helpfull**\n```\nbool canChange(string st, string tar) {\n        int n=tar.length();\n        int i=0,j=0;\n        while(i<=n && j<=n){\n            \n            while(i<n && tar[i]==\'_\') i++;\n            while(j<n && st[j]==\'_\') j++;\n            \n            if(i==n || j==n){\n                return i==n && j==n;\n            }\n            \n            if(tar[i]!=st[j]) return false;\n            \n            if(tar[i]==\'L\'){\n                if(j<i) return false;\n            }\n            else{\n                if(i<j) return false;\n            }\n            \n            i++;\n            j++;\n        }\n        return true;\n    }\n\t```
['C', 'Java']