2025-07-31 18:14:30 +0300 MSK

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))