(Divide and Conquer) Closest Pair of Pairs

Recently found an array of a pair of coordinates.

Ideas: first divided into left and right parts, respectively, to find the shortest distance: DL and DR, then d = min (dl, dr)

Together again, to find that the left and right portions of the shortest distance to the middle point of the edge: if d is not greater than considered.

 

Guess you like

Origin www.cnblogs.com/Bella2017/p/11234989.html