All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Register

Login

All New Register Login

All gists matching topic interview

Recently created
Least recently created
Recently updated
Least recently updated

linkjobai / System Design: Search Autocomplete (Typeahead)

0 likes
0 forks
1 files
Last active 21 hours ago
Interview prep notes
interview

System Design: Search Autocomplete (Typeahead)

Designing autocomplete, like the search box suggestions on Google or Amazon, is a popular interview question because it combines a classic data structure (the trie) with real latency constraints.

Requirements

  • Return the top 5 to 10 suggestions for a prefix as the user types.
  • Latency under about 100 ms end to end, so each lookup must be a few milliseconds.
  • Suggestions ranked by popularity, with some freshness (trending queries).
  • Scale example: 10M daily users, about 10 keystrokes per search.
Newer Older

Powered by Opengist ⋅ Load: 9ms⋅

日本語
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文