SpinTheMic
Pro

Interview practice question

Finding nearby restaurants

System Design · Databases · Intermediate

Users want to see restaurants within 3 km of their location. How do you store and query this efficiently?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Geospatial index (geohash, quadtree, R-tree).
  • PostGIS or Redis GEO or Elasticsearch geo.
  • Query nearby cells, filter by distance.
  • Cache popular areas.
  • Sort by distance or rating.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics