Two Pointers
We use two pointers to find the next non-blank space.\n\nThen, the character in the current position can be moved to the target position if:\n1. s[i] == t[j].\n
We use two pointers to find the next non-blank space.\n\nThen, the character in the current position can be moved to the target position if:\n1. `s[i] == t[j]`.\n2. `i >= j` for \'L\' characters.\n3. `i <= j` for \'R\' characters.\n\n**C++**\n\n```cpp\nbool canChange(string s, string t) {\n    int i = 0, j = 0, n = s.size();\n    for (; i < n || j < n; ++i, ++j) {\n        while (i < n && s[i] == \'_\')\n            ++i;\n        while (j < n && t[j] == \'_\')\n            ++j;\n        if (i == n || j == n || s[i] != t[j] || (s[i] == \'L\' && i < j) || (s[i] == \'R\' && i > j))\n            break;\n    }\n    return i == n && j == n;\n}\n```
['C']