Reachability Under Distance Threshold on Implicit Grid

Asked at Google · Coding Questions · Difficulty: Hard

You are given a set of points, each as coordinates (x, y), and a distance threshold. Two points are connected if the distance between them is at most the threshold (an implicit graph — edges are not given explicitly). Given a source and a target point, determine whether the target is **reachable** from the source by hopping between connected points.

Loading the problem…