You are given an array points representing integer coordinates of some points on a 2D plane,
where each point is given as points[i] = [xi, yi].
The Manhattan distance between two points
(x1, y1) and (x2, y2) is defined as:
You must remove exactly one point from the array such that
the maximum Manhattan distance between any two remaining points
is minimized.
Return the minimum possible value of that maximum distance.
Input: points = [[3,10],[5,15],[10,2],[4,4]]
Output: 12
Explanation:
Explanation: After removing each point, the maximum distances are: Removed Point Max Distance Points Responsible [3,10] 18 (5,15) & (10,2) [5,15] 15 (3,10) & (10,2) [10,2] 12 (5,15) & (4,4) [4,4] 18 (5,15) & (10,2) The minimum possible maximum distance is 12.
Input: points = [[1,1],[1,1],[1,1]]
Output: 0
Explanation:
All points are identical, so removing any point keeps all pairwise distances 0.
Accepted:
Submission: