Given a set of restaurants (the number being quite large) and its geographical location(x,y) , you are allowed to do an significant amount of pre-processing on it. Now suppose there are x customers located at position (s,t), design an efficient algorithm to find the k nearest restaurants to these customers.
Could you please define what you mean by nearest? Does it mean that the total sum of distances to all the k restaurants is minimized?
It can be considered as k nearest restaurants wrt distance (not sum).