CPKit
v1.6.1

Closest Pair of Points

GeometryHard

Divide and conquer coordinate bounds checks.

Alt+Shift+C

Architecture Ready Placeholder

Closest Pair Sweep-line visualizer

We are preparing interactive sweep-line overlays and strip dividers coordinates checking. Full animations coming soon!

Time Complexity

O(N log N) divide and conquer

Space Complexity

O(N) recursion stack memory
Conceptual Overview

The Closest Pair of Points problem finds the pair of coordinates in a 2D plane that has the minimum Euclidean distance between them.

Mathematical Formula
d = \min_{i \ne j} \sqrt{(x_i - x_j)^2 + (y_i - y_j)^2}
Source: CP-Algorithms geometry reference