Skip to main content

Designing Search

Problem Statements

Qn: Design a search auto-complete system Qn: Design a top-k search system

Step 1: Clarify the problem.

  • What is the input?
  • What is the output?
  • What is the expected behavior?
  • What are the constraints?
  • What are the assumptions?
  • What are the edge cases?
  • What are the examples?
  • What are the trade-offs?
  • How many auto-complete results do we want to show?
  • Does the system support spell-check?
  • Does the system support fuzzy search?
  • Are queries searched in English?
  • Does the system support spell-check?
  • What are the expected number of users?
  • Expected rate of response time?

Step 2: Design the system

Let's say the interviewer has answered most of the above questions and have given you the list of features that the system should support. Now, it's time to design the system.

Step 2.1: System Requirements

  • Fast response time from the search query

WIP ...