rahul_1234's blog

By rahul_1234, history, 8 years ago, In English

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.

  • Vote: I like it
  • -2
  • Vote: I do not like it

»
8 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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?

  • »
    »
    8 years ago, # ^ |
    Rev. 3   Vote: I like it +1 Vote: I do not like it

    It can be considered as k nearest restaurants wrt distance (not sum).