SIMPLE || O(n) || C++ || Explained
\nBasically two points are essential for our answer to be YES\n1. for all R and L in target there should be a corresponding R and L in start also.Means The rela
\nBasically two points are essential for our answer to be YES\n1. for all R and L in target there should be a corresponding R and L in start also.Means The relative order of L/R in start and target should be same.Becoz we cant move L beyond a R or R beyond a L.\n2. for every R and L in Target, the corresponding R/L in start can be\n\ta) Corresponding L can be ahead in start, becoz we can always bring it to left and make position equal to that of in target.\n\tb) Corresponding R can be behind in start, becoz we can always bring it to right and make position equal to that of in target.\n\telse Answer will be NO\nSo, save all chars and their position from start in a vector, and for every element L/R in target,check for above two condition if it satisfies\nwe are good to go else Answer will be NO.\n\n\n\n```\nclass Solution {\npublic:\n    \n\n    bool canChange(string start, string target) {\n        \n        \n        vector<pair<char,int >> v;\n        for(int i =0 ;i  < start.size();i++)\n        {\n            if(start[i] == \'L\' || start[i] == \'R\')\n            {\n                v.push_back({start[i],i});\n            }\n        }\n        \n        int i = 0;\n        for(int j = 0;j < target.size();j++)\n        {\n            if(target[j] == \'L\' || target[j] == \'R\') // lets find its corresponding Element in start\n            {\n                if(i >= v.size() || v[i].first != target[j]) // Not found or Different found\n                {\n                    return false;\n                }else \n                {\n                   \n                    if(v[i].first == \'L\' && v[i].second < j) // Condition a unsatisfied\n                        return false;\n                     if(v[i].first == \'R\' && v[i].second > j) // Condition b unsatisfied\n                        return false;\n                     else \n                        i++; // all good we move ahead in start;\n                }\n               \n                \n            }\n        }\n        \n        return i == v.size();// all elements accounted for in start\n    }\n};\n```\nConsider Upvoting.
['C']