class Solution {
public:
bool repeatedSubstringPattern(string s) {
string ss = s + s;
string ss_(ss.begin() + 1, ss.end() - 1);
return (ss_.find(s)<=ss.size());
}
};
leetcode459 C++ 32ms 重复子串构成的字符串
猜你喜欢
转载自www.cnblogs.com/theodoric008/p/9373561.html
今日推荐
周排行