Bird
Raised Fist0
HLDsystem_design~10 mins

Design a search autocomplete in HLD - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to identify the main component responsible for storing user queries.

HLD
The component that stores user queries for autocomplete suggestions is called the [1].
Drag options to blanks, or click blank then click option'
ADatabase
BCache
CLoad Balancer
DAPI Gateway
Attempts:
3 left
💡 Hint
Common Mistakes
Confusing cache with persistent storage.
2fill in blank
medium

Complete the code to specify the component that handles user input and returns suggestions.

HLD
The [1] receives user input and returns autocomplete suggestions.
Drag options to blanks, or click blank then click option'
ALoad Balancer
BDatabase
CCache
DAutocomplete Service
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing database or cache instead of service.
3fill in blank
hard

Fix the error in the description of the data structure used for fast prefix search.

HLD
A common data structure for fast prefix search in autocomplete is a [1].
Drag options to blanks, or click blank then click option'
ALinked List
BHash Map
CTrie
DStack
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing hash map or linked list which are less efficient for prefix search.
4fill in blank
hard

Fill both blanks to complete the caching strategy for autocomplete suggestions.

HLD
To improve performance, autocomplete suggestions are stored in a [1] which is updated every [2] minutes.
Drag options to blanks, or click blank then click option'
Acache
Bdatabase
C5
D60
Attempts:
3 left
💡 Hint
Common Mistakes
Using database instead of cache for fast access.
Updating cache too rarely or too often.
5fill in blank
hard

Fill all three blanks to complete the request flow for autocomplete.

HLD
User input is sent to the [1], which queries the [2]. If data is missing, it fetches from the [3].
Drag options to blanks, or click blank then click option'
AAutocomplete Service
BCache
CDatabase
DLoad Balancer
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing roles of cache and database.
Confusing load balancer with service.