2025-07-31 15:14:30 +0000 UTC

Rotate String

Code

class Solution:
    def rotateString(self, s: str, goal: str) -> bool:
        if len(s) != len(goal):
            return False
        return goal in "".join((s, s))