Extraordinary Solution C++
we are storing 2 different versions of possible strings\nfirst with only Ls on the left\nsecond with Rs on the right side \nIn the end we just check if current 
we are storing 2 different versions of possible strings\nfirst with only Ls on the left\nsecond with Rs on the right side \nIn the end we just check if current letter is L we are looking at 1st string\nand the same for R\n```class Solution {\npublic:\n    bool canChange(string start, string target) {\n        string t = start;\n        int cnt = 0;\n        for(int i = 0; i < start.size(); i++){\n            if(start[i] == \'L\'){\n                int j = i;\n                while(j-- && start[j] == \'_\')\n                    start[j] = \'L\';\n                cnt++;\n            }\n            else if(start[i] == \'R\'){\n                i++;\n                while(i < t.size() && t[i] == \'_\')\n                    t[i] = \'R\', i++;\n                i--;\n                cnt++;\n            }\n        }\n        cout << start << \' \' << t << \' \' << target<< endl;\n        for(int i = 0; i < target.size(); i++){\n            if(target[i] == \'L\'){\n                if(start[i] != \'L\')\n                    return false;\n                cnt--;\n            }\n            \n            if(target[i] == \'R\'){\n                if(t[i] != \'R\')\n                    return false;\n                cnt--;\n            }\n            \n        }\n        if(cnt)\n            return false;\n        return true;\n    }\n};\n```\n
['Greedy', 'C']