Given n points on a 2D plane where points[i] = [xi, yi], Return&nbsp;the widest vertical area between two points such that no points are inside the area.

A vertical area is an area of fixed-width extending infinitely along the y-axis (i.e., infinite height). The widest vertical area is the one with the maximum width.

Note that points on the edge of a vertical area are not considered included in the area.

&nbsp;
Example 1:
​
Input: points = [[8,7],[9,9],[7,4],[9,7]]
Output: 1
Explanation: Both the red and the blue area are optimal.


Example 2:

Input: points = [[3,1],[9,0],[1,0],[1,4],[5,3],[8,8]]
Output: 3


&nbsp;
Constraints:


	n == points.length
	2 &lt;= n &lt;= 105
	points[i].length == 2
	0 &lt;= xi, yi&nbsp;&lt;= 109


class Solution:
    def maxWidthOfVerticalArea(self, points: List[List[int]]) -> int:
        # only taking x-axis point as it's relevant
        arr = [i[0] for i in points]
        
        arr.sort()
        
        diff = -1
        for i in range(1, len(arr)):
            diff = max(diff, arr[i] - arr[i - 1])
        
        return diff
class Solution {
    public int maxWidthOfVerticalArea(int[][] points) {
        int L = points.length;
        // y-coordinate of a point does not matter in width
        int arr[] = new int[L];
        for(int i=0;i<L;i++){
            arr[i]=points[i][0];
        }
        Arrays.sort(arr);

        int diff = Integer.MIN_VALUE;

        for(int i=1;i<L;i++){
            if((arr[i]-arr[i-1])>diff){
                diff=arr[i]-arr[i-1];
            }
        }
        return diff;
    }
}
class Solution {
public:
    int maxWidthOfVerticalArea(vector<vector<int>>& points) {
        sort(begin(points),end(points));
        int n=points.size();
        int m=0;
        for(int i=0;i<n-1;i++)
            m=max(points[i+1][0]-points[i][0],m);
        return m;
    }
};
var maxWidthOfVerticalArea = function(points) {
    let ans = 0;
    points = points.map(item => item[0]).sort((a, b) => a - b);
    
    for(let i = 1; i < points.length; i++){
        
        ans = Math.max(ans, points[i] - points[i-1]);
    }
        
    return ans;
};
Widest Vertical Area Between Two Points Containing No Points