Tap here to switch tabs
Problem
Submissions

Problem: Unique Substrings in Wraparound String

Try to solve the Unique Substrings in Wraparound String problem.

Statement

Consider an infinite wraparound string base formed by repeating the lowercase English alphabet indefinitely: "...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz...".

Given a string s, return the number of unique non empty substrings of s that also appear as substrings in base.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Unique Substrings in Wraparound String

Try to solve the Unique Substrings in Wraparound String problem.

Statement

Consider an infinite wraparound string base formed by repeating the lowercase English alphabet indefinitely: "...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz...".

Given a string s, return the number of unique non empty substrings of s that also appear as substrings in base.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists of lowercase English letters.