Infibeam Interview Question
SDE-2sCountry: India
Interview Type: Phone Interview
I think GeoHash can help to solve this problem.
for each position on the map, can use the GeoHash to encode the position to an string.
so for each location, we will store , geohash Key, location.
and the benefit of geohash is the near location will has the same prefix of the hash key.
which can help to fast get the near location from Data base.
with select location where hashKey likes "hashkey prefix"
what kind of places you are talking about?
- Eric Lei April 30, 2014Location table: Coordinates + Location properties(category, name, phone number, street, city, etc)
Categories table: restaurant/mall/parks/etc..
Cities table:
...
this can be a very large db