A rotation of a string must appear within the original string concatenated with itself, provided both lengths match.
complexity
O(n) expected time and O(n) space.
solution files
- Go
rotate-string/solution.go - Python
rotate-string/solution.py - TypeScript
rotate-string/solution.ts