O(N) solution fully Explained
""" public boolean canChange(String start, String target) {\n        \n        // Here in the problem We can See that the order in which elements appear in src 
""" public boolean canChange(String start, String target) {\n        \n        // Here in the problem We can See that the order in which elements appear in src and target must not be different \n        // If the ordering is different then we can simply return false\n        // this is so Bcoz Lets have src="_ R _ _ _ _ L _"\n        // Then we can move R to any right place but when it is immediately before L (ie. _ _ _ _ _ RL _) then no extra space is left for\n        // R to move so there is no way R can cross L and hence we can say that Relative order in which elements appear in the string \n        // remains constant.\n        \n        int si=0;\n        int ti=0;\n        while(si<start.length() || ti< target.length()){\n            \n            // Now our main focus is to compare the elements so we can leave the indices which have \'_\' \n            \n            while(si<start.length() && start.charAt(si)==\'_\')\n                si++;\n            \n            while(ti< target.length() && target.charAt(ti)==\'_\')\n                ti++;\n            \n            // Now it might be that you reached the end of a string\n            \n            // So if you have reached the end of both the STrings that means that string have been fully compared and everything seems \n            // Fine so we can return True \n            \n            if(si==start.length() && ti == target.length()){\n                return true;\n            }\n            \n            // But if you have reached the end of one string but there are still characters remaing in the other string\n            // then obviously now no comparison can be made and hance we can return False\n            \n            if(si==start.length() || ti== target.length()){\n                return false;\n            }\n            \n            // If none of the above conditions holds true that means we are at some character\n            \n            // So if these characters are not same that means relative Ordering is different\n            // So we can return False\n            if(start.charAt(si) != target.charAt(ti))\n                return false;\n            \n            // Since you are at this point that means characters must be matching\n            \n            // Now you have to check if L in src String is farther from target L or not \n            // Ie src = " _ _ _ _ L" and target = " _ _ L _ _"  so L in src string is at idx 4 while in target it is at 2\n            // So L in src can move left to cover that place but what if \n            // src=" _ _ L _ _" and target = " _ _ _ L _" now L can only move left and not right so return false for this conditions as well\n            \n            if(start.charAt(si)==\'L\' && si<ti )\n                return false;\n            \n            // Similarly you can do the same thing for R as well\n            \n            if(start.charAt(si)==\'R\' && si > ti)\n                return false;\n            \n            // Do this till all elements are not compared\n            si++;\n            ti++;\n            \n        }\n        \n        // If you are this point that means all conditions have passed well so we can now return True\n        return true;\n    }\n\n"""
['Two Pointers', 'Java']