Skip to main content

Command Palette

Search for a command to run...

796. Rotate String

Published
1 min read
796. Rotate String
class Solution:
    def rotateString(self, s: str, goal: str) -> bool:
        return len(goal) == len(s) and goal in s * 2