complete closestPair explainage