796. Rotate String
All prompts are owned by LeetCode. To view the prompt, click the title link above.
First completed : November 04, 2024
Last updated : November 04, 2024
Related Topics : String, String Matching
Acceptance Rate : 63.57 %
class Solution:
def rotateString(self, s: str, goal: str) -> bool:
return any(goal == s[i:] + s[:i] for i in range(len(s)))