Tap here to switch tabs
Problem
Submissions

Problem: Maximum Repeating Substring

med
30 min
Try to solve the Maximum Repeating Substring problem.

Statement

Given two strings sequence and word, return the maximum integer kk such that word repeated kk times is a substring of sequence. If word is not a substring of sequence, return 00.

Constraints:

  • 1≤1 \le sequence.length ≤100\le 100

  • 1≤1 \le word.length ≤100\le 100

  • sequence and word contain only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum Repeating Substring

med
30 min
Try to solve the Maximum Repeating Substring problem.

Statement

Given two strings sequence and word, return the maximum integer kk such that word repeated kk times is a substring of sequence. If word is not a substring of sequence, return 00.

Constraints:

  • 1≤1 \le sequence.length ≤100\le 100

  • 1≤1 \le word.length ≤100\le 100

  • sequence and word contain only lowercase English letters.