Rotate String
Easy
Strings
String
Return true if s2 can be obtained by rotating s1.
Constraints
1 ≤ len ≤ 100
Examples
Example 1:
Input: abcde
cdeab
Output: true
Example 2:
Input: abcde
abced
Output: false
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console