1
# Runtime: 33 ms, faster than 90.10% of Python3 online submissions for Rotate String.
2
# Memory Usage: 13.8 MB, less than 97.64% of Python3 online submissions for Rotate String.
3

4

5
class Solution:
6
def rotateString(self, s: str, goal: str) -> bool:
7
for x in range(len(s)):
8
s = s[-1] + s[:-1]
9
if goal == s:
10
return True
11
return False

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0