Available question text
Count the number of distinct non-empty substrings of s that appear in the infinite wraparound alphabet (i.e., substrings where each character is the next letter modulo 26). The key observation is to track, for each ending character, the longest contiguous wraparound run ending there and sum those lengths to get the number of unique substrings (O(n) time, n up to 1e5).
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 467. Unique Substrings in Wraparound String
Interview date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source