Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1163. Last Substring in Lexicographical Order
Return the lexicographically largest substring of s, i.e., the maximum among all suffixes and substrings starting at any index. Because n can be large (≤4·10^5), the challenge is to pick the maximal starting position efficiently (linear-time suffix comparison / Booth-style two-pointer approach) rather than enumerating all substrings.
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.