[Python 3] 2 pointers
\tclass Solution:\n\t\tdef canChange(self, start: str, target: str) -> bool:\n\t\t\ti=j=0\n\t\t\tn=len(start)\n\t\t\twhile i<n or j<n:\n\t\t\t\twhile ii or star
\tclass Solution:\n\t\tdef canChange(self, start: str, target: str) -> bool:\n\t\t\ti=j=0\n\t\t\tn=len(start)\n\t\t\twhile i<n or j<n:\n\t\t\t\twhile i<n and start[i]==\'_\':\n\t\t\t\t\ti+=1\n\t\t\t\twhile j<n and target[j]==\'_\':\n\t\t\t\t\tj+=1\n\t\t\t\tif i==n or j==n:\n\t\t\t\t\treturn i==j\n\t\t\t\tif start[i]!=target[j]:\n\t\t\t\t\treturn False\n\t\t\t\tif start[i]==\'L\' and j>i or start[i]==\'R\' and i>j: # because \'L\' cannnot move to left and vice versa and None of them can jump each other\n\t\t\t\t\treturn False\n\t\t\t\ti+=1\n\t\t\t\tj+=1\n\t\t\treturn True
[]