I have a question about the efficiency of an algorithm:You have a list of x,y pointsNow I want to get all the points that are up to 5 units away from a reference x,y pointHow do you calculate it in the most efficient way?I just go over each point and calculate distance, and if that distance is less than 5, I add it to the answerIf you know how this algorithm is called - I'd be happy if you post that too.
Making an algorithm more efficient
algorithms;efficiency