Closest pairs and Quick sort