@dabbcomputers: looking at the worstcase, listing all points in the set itself takes O(n) time,
just to speed up the time would be sort all the points(x,y) wrt x-values & another with sorting on y-values, and restrict the target solution space to (x +(or)- R) & (y +(or)- R) and work on those points, its easy to get the list of points with in the range on a sorted set. -- You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To view this discussion on the web visit https://groups.google.com/d/msg/algogeeks/-/U9qrk3cVSlEJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/algogeeks?hl=en.
