1010data Interview Question

first the closest point from target