Java AC Solution, with explanation
\n```\n    public boolean canTransform(String start, String end) {\n        /\n        Core concept - Left should stay in the left and R should stay in the righ
\n```\n    public boolean canTransform(String start, String end) {\n        /**\n        Core concept - Left should stay in the left and R should stay in the right\n        we traverse both the string ignoring the \'X\'\n        If both indices reach the end, we are good, return true.\n        If either reaches end means a mismatch, so return false\n        Also L can only move left so if the position of L in the END is after START, return false\n        Similarly if R moves left, return false\n        \n        **/\n        if(start.length() != end.length()) return false;\n        \n        int i=0, j =0;\n        while(i<start.length() && j<start.length()) {\n            \n            while(i<start.length() && start.charAt(i) == \'X\') i++;\n            while(j<end.length() && end.charAt(j) == \'X\') j++;\n            \n            \n            if(i == start.length() && j == start.length()) return true;\n            if(i == start.length() || j == start.length()) return false;\n            \n            if(start.charAt(i) != end.charAt(j) ) return false;\n            \n            if(start.charAt(i) ==\'L\' && i<j) return false;\n            \n            if(start.charAt(i) ==\'R\' && i>j) return false;\n            \n            i++;\n            j++;\n        }\n        return true;\n    }
[]