题解 | #旋转字符串#
旋转字符串
http://www.nowcoder.com/practice/80b6bb8797644c83bc50ac761b72981c
class Solution {
public:
/**
* 旋转字符串
* @param A string字符串
* @param B string字符串
* @return bool布尔型
*/
bool solve(string A, string B) {
// write code here
return A.size() == B.size() && (A + A).find(B) != -1;
}
};