C++ ✅|| Greedy🔥|| Easy Understanding
UPVOTE\nwe will store all the indexes witht the characters where here is L and R in the start and target string respectively.\n\n\ntypedef vector<pair<char,int>
##### ***UPVOTE***\nwe will store all the indexes witht the characters where here is L and R in the start and target string respectively.\n\n```\ntypedef vector<pair<char,int>> vi; // used to shorten the code for me little bit\nclass Solution {\npublic:\n    bool canChange(string start, string target) {\n        int n = start.size();\n        vi a,b;\n        for(int i = 0;i < n;++i){\n            if(start[i] != \'_\') a.push_back({start[i],i}); // storing L and R in start with their index\n            if(target[i] != \'_\') b.push_back({target[i],i}); // storing L and R in start with their index\n        }\n        int op = a.size();\n        int pp = b.size();\n        if(op == pp){ // check if their sizes are equal if not then return false \n            for(int i = 0;i < op;++i){\n                if(a[i].first == b[i].first){ // elements equal we will check their position with respect to each other\n                    if(a[i].first == \'L\'){\n                        if(a[i].second < b[i].second) return false;\n                    }else {\n                        if(a[i].second > b[i].second) return false;\n                    }\n                }else return false; // Elements not equal so we will return just false\n            }\n            return true;\n        }\n        return false; // since check the case where it can be true now we have to just return false \n    }\n};\n```
['Greedy', 'C']