Prefix Lookup Not Exact
An autocomplete service holds a set of stored strings. Each request supplies a query string q, and the service must return the alphabetically first stored string that is greater than or equal to q. Requests arrive faster than 10k per second and the stored set changes throughout the day.
A colleague proposes a hash set, arguing that a hash set is the fastest possible lookup structure. What is wrong with that?
Sign in to answer questions and track your progress
Sign In