Rotate String
One move takes the first character of s and puts it at the end. Return True if s can become goal after some number of moves (zero moves allowed), otherwise False.
Example 1
s "abcde"
goal "cdeab"
returns true
Two moves turn abcde into cdeab.
Example 2
s "abcde"
goal "abced"
returns false
No rotation matches.
Constraints
1 <= len(s), len(goal) <= 50
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.