Beats 100%
Code\n\nclass Solution {\n    fun canTransform(start: String, end: String): Boolean {\n\n        val size = start.length\n\n        var i = 0\n        var j = 0
# Code\n```\nclass Solution {\n    fun canTransform(start: String, end: String): Boolean {\n\n        val size = start.length\n\n        var i = 0\n        var j = 0\n\n        while (i < size || j < size) {\n            while (i < size  && start[i] == \'X\') {\n                i++\n            }\n            while (j < size && end[j] == \'X\') {\n                j++\n            }\n            if(i == size || j == size) {\n                break\n            }\n            if (\n                start[i] != end[j] ||\n                (start[i] == \'L\' && i < j) ||\n                (start[i] == \'R\' && i > j)\n            ) {\n                return false\n            }\n            i++\n            j++\n        }\n\n        return i == size && j == size\n    }\n}\n```
['Kotlin']