FB 高频系统设计题:Design POI

POI是要设计一个location-based system, 类似于design yelp

POI
A point of interest, or POI, is a specific point location that someone may find useful or interesting.

Q1. Given the current location, how to find the most closest k points.
Q2. Given the current location, how to find all the points within k miles.

A1. Geohash
A2. K-D tree
A3. Space-filling Curve

intersection of intervals – search points in a range.
intersection of rectangles (using bst) search overlapped intervals

其余FB高频经典design题:

  • design messaging system

  • design online/offline status system

  • design ins

  • design POI

  • design news feed, API

  • design search post system

  • design memcache

  • design typeahead