解题思路:
(1)字符串旋转一定次数后便会变成原本的字符串
class Solution {
public:
bool rotateString(string A, string B) {
if(A==B && A=="") return true;
char temp = 'a';
for(int i=0;i<A.length();i++) {
temp = A[0];
for(int j=0;j<A.length();j++) {
A[j]=A[j+1];
}
A[A.length()-1]=temp;
if(A==B) return true;
}
return false;
}
};