Leetcode 812 Solution

This article provides solution to leetcode question 812 (rotate-string)

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;
    }
};