🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← All topics

Quiz: Design Search Autocomplete: questions with answers

10 questions, each with the answer and a short explanation.

Take the timed quiz + get a certificate →
  1. Q1. Why store the top-k suggestions at every trie node?
  2. Q2. What does this print? (code)
  3. Q3. Why is the trie rebuilt from logs in batches instead of updated on every search?
  4. Q4. 10 million users make 10 searches a day, typing about 6 characters each. Roughly how many requests per second is that?
  5. Q5. What does this print? (code)
  6. Q6. What is debouncing in an autocomplete box?
  7. Q7. Why is sharding the trie strictly by alphabet ranges risky?
  8. Q8. Which prefixes benefit most from caching in a CDN or browser?
  9. Q9. What is the time to answer one lookup in a trie with top-k stored at each node?
  10. Q10. An offensive suggestion appears after a rebuild. What should the design include?