Skip to content

Commit e1bb5a7

Browse files
committed
Solution as on 18-02-2022 07:13 pm
1 parent 6ef729b commit e1bb5a7

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// 1637.✅ Widest Vertical Area Between Two Points Containing No Points
2+
3+
class Solution
4+
{
5+
public:
6+
int maxWidthOfVerticalArea(vector<vector<int>> &points)
7+
{
8+
9+
sort(points.begin(), points.end());
10+
int res = 0;
11+
12+
for (int i = 0; i < points.size() - 1; ++i)
13+
res = max(res, points[i + 1][0] - points[i][0]);
14+
15+
return res;
16+
}
17+
};

0 commit comments

Comments
 (0)