A C++ implementation of the classic closest-pair-of-points algorithm using a divide-and-conquer approach. Reads a set of 2D points from a file and reports the closest pair and their distance.
closest_points.cpp— main program implementing the closest-pair algorithmutility.h— common header with standard library includespoints.txt— sample input (onex ypair per line)
g++ -std=c++17 closest_points.cpp -o closest./closest # reads points.txtThe input file lists one point per line as space-separated x y coordinates.