abcde cdeab
Yes
\(abcde\) and \(cdeab\) -> Yes
\(abcde\) and \(edcba\) -> No
\(abcdeabcde\) and \(abcde\) -> No
Example of rotating a string:
\( abcde\) -> \(bcdea\) -> \( cdeab\) -> \(deabc\) -> \(eabcd\) -> \( abcde\)