### rahul_1234's blog

By rahul_1234, history, 11 months ago, ,

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.

•
• -2
•

 » 11 months ago, # |   0 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?
•  » » 11 months ago, # ^ | ← Rev. 3 →   +1 It can be considered as k nearest restaurants wrt distance (not sum).