Leetcode 812 Solution
This article provides solution to leetcode question 812 (rotate-string)
Access this page by simply typing in "lcs 812" in your browser address bar if you have bunnylol configured.
Leetcode Question Link
https://leetcode.com/problems/rotate-string
Solution
class Solution {
public:
bool rotateString(string A, string B) {
return A.size() == B.size() && (A + A).find(B) != string::npos;
}
};