All interviews45:00
Typeahead / autocomplete
Return the top k query completions on every keystroke in under 50 ms so suggestions feel instantaneous. The trick is precomputing the top-k list at every trie node offline or in a streaming window, serving reads entirely from memory, and never mutating the trie synchronously on the read path.
Notes and ratings save in this browser. Completing self-assessment records your progress.
Requirements checklist
Clarifying questions
- How many suggestions per prefix, and are they global, per-language, or personalised?
- How quickly must a newly trending query appear in suggestions?
- Do we support spell correction / fuzzy prefix matching or strict prefixes only?
- How fast must a blocked/offensive suggestion be removed globally?
requirements
Suggested time: about 6 minutes. Separates keystroke read path from completed-query logging and trending velocity.