| https://leetcode.com/problems/maximum-repeating-substring/description/ | Easy |
|---|
class Solution {
fun maxRepeating(sequence: String, word: String): Int {
var k = 0
while (sequence.contains(word.repeat(k + 1))) k++
return k
}
}