Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1698. Number of Distinct Substrings in a String
Count the number of distinct substrings of a given string. Efficient solutions use suffix automata or suffix array + LCP (or rolling hashes) to avoid quadratic enumeration and run in O(n)–O(n log n) time for large n.
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.