Tap here to switch tabs
Problem
Submissions

Problem: Distinct Echo Substrings

med
30 min
Try to solve the Distinct Echo Substrings problem.

Statement

Given a string text, return the number of distinct substrings of text that can be written as the concatenation of a string with itself. More formally, count the number of unique substrings that can be expressed as a+aa + a, where aa is some string of length greater than 00.

Constraints:

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

  • text consists of only lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Distinct Echo Substrings

med
30 min
Try to solve the Distinct Echo Substrings problem.

Statement

Given a string text, return the number of distinct substrings of text that can be written as the concatenation of a string with itself. More formally, count the number of unique substrings that can be expressed as a+aa + a, where aa is some string of length greater than 00.

Constraints:

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

  • text consists of only lowercase English letters.