Consider the vertical line passing through the middle point calculate the smallest distance dl on left of middle point and dr on right side
dl = closestUtil ( Pl , Q , mid ) NEW_LINE dr = closestUtil ( Pr , Q , n - mid ) NEW_LINE