Given two strings s and goal, determine whether goal can be obtained by rotating s. A rotation moves some number of characters from the beginning of s to the end while keeping their order.
Return true if goal is a rotation of s, otherwise return false.
Constraints:
s.length, goal.length
s and goal consist of lowercase English letters.
Given two strings s and goal, determine whether goal can be obtained by rotating s. A rotation moves some number of characters from the beginning of s to the end while keeping their order.
Return true if goal is a rotation of s, otherwise return false.
Constraints:
s.length, goal.length
s and goal consist of lowercase English letters.