Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Leetcode 642. Design Search Autocomplete System
Design an online autocomplete system that processes characters one-by-one, returning the top 3 historically most frequent sentences that match the current prefix (ranked by frequency, then lexicographically), and inserts new sentences when the special character '#' is entered. The core challenge is supporting fast prefix queries and incremental updates over sentence frequencies, typically requiring a prefix-indexed structure (e.g., trie) or efficient top-k maintenance per prefix.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Mid September, 2025
Mid-level
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.