source and target. In one operation you take the first letter of source and move it to the end. For example, one operation turns "lemon" into "emonl".
Return True if applying the operation any number of times (zero included) can turn source into target, and False otherwise.source="python", target="honpyt" → True
Move 'p', then 'y', then 't' from the front to the back: python → ythonp → thonpy → honpyt.
source="stack", target="tacks" → True
Moving 's' to the back once gives 'tacks'.
source="queue", target="queues" → False
A shift never changes the length, and the lengths differ.
source="python", target="honpyt"
True
Run checks the first 3 tests in your browser. Submit checks all 114 tests on the server, hidden ones included.