You are given two strings start and result, each composed of the characters 'L', 'R', and 'X'.
A single move consists of performing one of the following operations:
Replace any occurrence of "XL" with "LX".
Replace any occurrence of "RX" with "XR".
Return true if it is possible to transform start into result through any number of valid moves, or false otherwise.
Constraints:
start.length
start.length result.length
Both start and result consist only of the characters 'L', 'R', and 'X'.
You are given two strings start and result, each composed of the characters 'L', 'R', and 'X'.
A single move consists of performing one of the following operations:
Replace any occurrence of "XL" with "LX".
Replace any occurrence of "RX" with "XR".
Return true if it is possible to transform start into result through any number of valid moves, or false otherwise.
Constraints:
start.length
start.length result.length
Both start and result consist only of the characters 'L', 'R', and 'X'.