Skip to content

aitiern/B503-Program2.1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Closest Pair of Points (Divide & Conquer)

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.

Files

  • closest_points.cpp — main program implementing the closest-pair algorithm
  • utility.h — common header with standard library includes
  • points.txt — sample input (one x y pair per line)

Build

g++ -std=c++17 closest_points.cpp -o closest

Run

./closest          # reads points.txt

The input file lists one point per line as space-separated x y coordinates.

About

C++ divide-and-conquer implementation of the closest-pair-of-points problem.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages