Closest pair algorithm notes