C++ Super Easy and Simple 2 Pointer Solution
Intuition\nWe will iterate through both strings, once we find a char that is not \'_\' - if they are equal, chack that it\'s on the left / right, depending on t
# Intuition\nWe will iterate through both strings, once we find a char that is not \'_\' - if they are equal, chack that it\'s on the left / right, depending on the char.\n\n# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(1)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    bool canChange(string start, string target) {\n        int s_ptr = 0, t_ptr = 0, n = start.size();\n        while (s_ptr <= n && t_ptr <= n) {\n            while (s_ptr < n && start[s_ptr] == \'_\') s_ptr++;\n            while (t_ptr < n && target[t_ptr] == \'_\') t_ptr++;\n\n            if (s_ptr == n || t_ptr == n) return s_ptr == n && t_ptr == n;\n\n            if (start[s_ptr] != target[t_ptr]) return false;\n\n            if (start[s_ptr] == \'R\') {\n                if (s_ptr > t_ptr) return false;\n            }\n\n            else if (start[s_ptr] == \'L\') {\n                if (s_ptr < t_ptr) return false;\n            }\n\n            s_ptr++;\n            t_ptr++;\n        }\n        return true;\n    }\n};\n```
['C++']