Maximum Repeating Substring
<-E 1668> Maximum Repeating Substring
class Solution {
public:
int maxRepeating(string sequence, string word) {
string temp = word;
int times = 0;
while (sequence.find(temp) != string::npos) {
temp += word;
times++;
}
return times;
}
};