1
$\begingroup$

I have two lists:

  • Location list, it contains point of interest

  • People list, it contains coordinates of every person. One single person could be in the list multiple times, depending from the log time. Someone who is out for a walk will result in two different locations in two different hours.

I would find out what people where near every point of interest.

I could approach the problem with brute force: external loop check for every point of interest the entire people list finding out who was there.

I would obviously avoid brute force. I thought about Nearest Neighbour, for sure multiple people will be in the same spot so I could look for a point of interest in the cluster.

Solutions?

$\endgroup$

1 Answer 1

1
$\begingroup$

Use a data structure designed for nearest neighbor search.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.