Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 467. Unique Substrings in Wraparound String
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).
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.