1668. Maximum Repeating Substring Updated: 2024-03-12 1 min read Algorithms , LeetCode On This PageLeetCode problem 1668class Solution: def maxRepeating(self, sequence: str, word: str) -> int: for k in range(len(sequence) // len(word), -1, -1): if word * k in sequence: return k