All Stories published by 100 days of algorithms on April 17, 2017

Day 24: Closest pair of points

Given a set of 2D points, the mission is to find the closest pair.

Naive strategy would be to examine all the pairs and choose the closest one. But naive is also expensive, leading to O(n²) time complexity.

About
100 days of algorithms
100 days, 100 algorithms - a challenge consisting of many small pieces
More information
Tags
Editors