Simple Two Pointers | Commented | C++
IntuitionApproachComplexity
Time complexity: O(n)

Space complexity: O(1)
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# Complexity
- Time complexity: O(n)
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity: O(1)
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```cpp []
class Solution {
public:
    bool canChange(string start, string target) {
        int n = target.size();
        int tInd = 0;   //target index
        int sInd = 0;   //start index
        
        while(tInd < n || sInd < n) {
            
            while(tInd < n && target[tInd] == '_') tInd++;

            while(sInd < n && start[sInd] == '_') sInd++;

            //sequence of characters should be same
            if(start[sInd] != target[tInd]) return false;

            //L in start should not be on the left of L in target
            if(start[sInd] == 'L' && sInd < tInd) return false;

            //R in start should not be on the right of R in target
            if(start[sInd] == 'R' && sInd > tInd) return false;

            tInd++;
            sInd++;
        }

        return true;
    }
};
```
['C++']