Most Simple soln | C++ | TC: O(n)
Intuition\n\nThink about all the cases where the conversion from start to target is not possible. Then find the generic condition where the conversion from star
# Intuition\n\nThink about all the cases where the conversion from start to target is not possible. Then find the generic condition where the conversion from start to target is not possible.\n\n# Approach\n\n1. If the sequence of L and R is not equal in both the strings then automatically we can never convert start to target.\n2. Cases where the conversion is not possible: \n        i. if L in start comes before the L in target.\n        ii. if R in start comes after the R in target.\n\n# Complexity\n- Time complexity: O(n)\n\n- Space complexity: O(n)\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    bool canChange(string s, string t) {\n        string temp1="",temp2="";\n        for(int i=0;i<s.size();i++){\n            if(s[i]!=\'_\')temp1+=s[i];\n        }\n        for(int i=0;i<t.size();i++){\n            if(t[i]!=\'_\')temp2+=t[i];\n        }\n\n        if(temp1!=temp2)return false;\n\n        int sl=0,tl=0,sr=0,tr=0;\n        for(int i=0,j=0;i<s.size();i++,j++){\n            if(s[i]==\'L\')sl++;\n            if(t[i]==\'L\')tl++;\n            if(s[i]==\'R\')sr++;\n            if(t[i]==\'R\')tr++;\n            if(sl>tl||tr>sr)return false;\n        }\n\n        return true;\n    }\n};\n```
['C++']