← 📍 Algorithms

📍 The Closest Pair of Points Problem: A Classic Divide-and-Conquer Algorithm

Comparisons: 0
Min distance:
Drag — rotate · Scroll — zoom

📍 The Closest Pair of Points Problem: A Classic Divide-and-Conquer Algorithm

This simulation visually demonstrates how the divide-and-conquer algorithm splits a set of points, solves each half recursively, and checks the narrow strip near the dividing line to find the overall closest pair.

🔬 What It Demonstrates

This simulation visually demonstrates how the divide-and-conquer algorithm splits a set of points, solves each half recursively, and checks the narrow strip near the dividing line to find the overall closest pair.

🎮 How to Use

Add or generate points on the plane, then step through the algorithm to watch the recursive splitting, the strip formation, and the final closest pair get highlighted.

💡 Did You Know?

For a set of one million points, the divide-and-conquer algorithm can be millions of times faster than brute force, turning a computation that might take hours into one that finishes in a fraction of a second.