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?

asked Mar 19, 2020 at 19:10
$\endgroup$

1 Answer 1

1
$\begingroup$

Use a data structure designed for nearest neighbor search.

answered Mar 19, 2020 at 23:11
$\endgroup$

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.