Tap here to switch tabs
Problem
Submissions

Problem: Minimize Manhattan Distances

Minimize Manhattan Distances gives an array of 2D points and asks you to remove exactly one, then return the smallest possible maximum Manhattan distance between any remaining pair.

Statement

You are given an array, points, where each element in points[i] =[xj,yi]= [x_j, y_i] represents the integer coordinates of a point in a 2D plane. The distance between any two points is defined as the Manhattan distanceThe Manhattan distance between two cells (x1, y1) and (x2, y2) is |x_1 - x_2| + |y_1 - y_2|..

Your task is to determine and return the smallest possible value for the maximum distance between any two points after removing exactly one point from the array.

Constraints:

  • 3≤3 \leq points.length ≤103\leq 10^3

  • points[i].length ==2== 2

  • 1≤1 \leq points[i][0], points[i][1] ≤103\leq 10^3

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimize Manhattan Distances

Minimize Manhattan Distances gives an array of 2D points and asks you to remove exactly one, then return the smallest possible maximum Manhattan distance between any remaining pair.

Statement

You are given an array, points, where each element in points[i] =[xj,yi]= [x_j, y_i] represents the integer coordinates of a point in a 2D plane. The distance between any two points is defined as the Manhattan distanceThe Manhattan distance between two cells (x1, y1) and (x2, y2) is |x_1 - x_2| + |y_1 - y_2|..

Your task is to determine and return the smallest possible value for the maximum distance between any two points after removing exactly one point from the array.

Constraints:

  • 3≤3 \leq points.length ≤103\leq 10^3

  • points[i].length ==2== 2

  • 1≤1 \leq points[i][0], points[i][1] ≤103\leq 10^3