Back to All 55 System Design Questions
#8Hard

Design Typeahead Suggestion/Autocomplete

Asked by:FacebookGoogleExpediaBloomberg

Recommended Solutions from the Web

Key Details & Edge Cases You Should Know

How will you store queries to support prefix-based lookup?

What data structure will you use for fast suggestions (Trie, inverted index, etc)? How will you keep it memory-efficient?

How do you handle large-scale writes (e.g., new searches per day)? Do you update the Trie/index in real time or in batches?