Leetcode 1637. Widest Vertical Area Between Two Points Containing No Points
Given n 2D points, find the maximum width of a vertical strip that contains no points — equivalently, the largest gap between consecutive x-coordinates when the points are sorted by x (points on the strip edges are not counted). With n up to 1e5 and coordinates up to 1e9, the solution reduces to sorting x-values and scanning for the maximum adjacent difference.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.