0467. Unique Substrings in Wraparound String
https://leetcode.com/problems/unique-substrings-in-wraparound-string
Description
We define the string s
to be the infinite wraparound string of "abcdefghijklmnopqrstuvwxyz"
, so s
will look like this:
"...zabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcd...."
.
Given a string p
, return the number of unique non-empty substrings of p
are present in s
.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= p.length <= 105
p
consists of lowercase English letters.
ac
Last updated