Minimize Manhattan Distances

You are given points, where points[i] = [xi, yi] is the location of the i-th point. Remove exactly one point, then consider every pair of the remaining points. Return the smallest possible value of the maximum Manhattan distance between any such pair.

The Manhattan distance between two points (x1, y1) and (x2, y2) is |x1 - x2| + |y1 - y2|. After removing one point at least two points remain, so the pair always exists.

Two transformations make the maximum distance easy to track. For two points, |dx| + |dy| = max(|dx + dy|, |dx - dy|). Therefore the maximum Manhattan distance over a set equals max(max(x + y) - min(x + y), max(x - y) - min(x - y)). Only points that attain one of these four extremes can change the answer when removed.

Examples
Input: [[3,10],[5,15],[10,2],[4,4]]
Output: 12
Hints

Minimize Manhattan Distances

You are given `points`, where `points[i] = [xi, yi]` is the location of the `i`-th point. Remove exactly one point, then consider every pair of the remaining points. Return the smallest possible value of the maximum Manhattan distance between any such pair.