Tap here to switch tabs
Problem
Submissions

Problem: Longest Repeating Substring

Longest Repeating Substring asks for the length of the longest contiguous part of a string that occurs at least twice. Return zero when no substring repeats.

Statement

Given a string s, return the length of the longest substring that appears at least 22 times in s. If no repeating substring exists, return 00.

Constraints:

  • 1≤1 \leq s.length ≤2000\leq 2000

  • s consists of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Longest Repeating Substring

Longest Repeating Substring asks for the length of the longest contiguous part of a string that occurs at least twice. Return zero when no substring repeats.

Statement

Given a string s, return the length of the longest substring that appears at least 22 times in s. If no repeating substring exists, return 00.

Constraints:

  • 1≤1 \leq s.length ≤2000\leq 2000

  • s consists of lowercase English letters.