Tap here to switch tabs
Problem
Submissions

Problem: Widest Vertical Area Between Two Points With No Points

Try to solve the Widest Vertical Area Between Two Points Containing No Points problem.

Statement

Given an array points where points[i] represents a point [[x_i, y_i]] on a Cartesian plane, return the maximum width of a vertical area between two points such that no points are contained inside the area.

A vertical area is defined as an area of fixed width extending infinitely along the y axis. The width of this vertical area corresponds to the distance between its two vertical boundaries.

Note: Points situated directly on the boundary lines of the vertical area are not considered to be inside the area.

Constraints:

  • n == points.length

  • 2≤2 \leq n ≤105\leq 10^5

  • points[i].length =2= 2

  • 0≤0 \leq x_i, y_i ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Widest Vertical Area Between Two Points With No Points

Try to solve the Widest Vertical Area Between Two Points Containing No Points problem.

Statement

Given an array points where points[i] represents a point [[x_i, y_i]] on a Cartesian plane, return the maximum width of a vertical area between two points such that no points are contained inside the area.

A vertical area is defined as an area of fixed width extending infinitely along the y axis. The width of this vertical area corresponds to the distance between its two vertical boundaries.

Note: Points situated directly on the boundary lines of the vertical area are not considered to be inside the area.

Constraints:

  • n == points.length

  • 2≤2 \leq n ≤105\leq 10^5

  • points[i].length =2= 2

  • 0≤0 \leq x_i, y_i ≤109\leq 10^9