Code AnalysisBeginner 60s
Trie Top-K for Search Autocomplete
SQL/pseudo:
for w in DICTIONARY: # 5M words
if w.startswith(prefix):
candidates.append(w)
sort(candidates)[:10]
Run on every keystroke.
What is the failure mode and fix?
Think you can answer under pressure?
Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.