Back to problems

Implement Resilient Autocomplete Data Fetching

Algorithm · Databricks · Hard

An autocomplete UI shell already exists. Your task is to implement the data layer that fetches suggestions as the user types. The component must wait for a short calm period before requesting suggestions, ignore stale responses, retry only transient failures with bounded backoff, and reuse fresh cached results. Assume a fetchSuggestions(query) function is available and returns a Promise that may resolve or reject. Debounce behavior After each query change, start a quiet…

Checking your access…