You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1001-1500/1499. Max Value of Equation.swift
+1
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@ class Solution {
3
3
// Solution by Sergey Leschev
4
4
5
5
// 1499. Max Value of Equation
6
+
6
7
// You are given an array points containing the coordinates of points on a 2D plane, sorted by the x-values, where points[i] = [xi, yi] such that xi < xj for all 1 <= i < j <= points.length. You are also given an integer k.
7
8
// Return the maximum value of the equation yi + yj + |xi - xj| where |xi - xj| <= k and 1 <= i < j <= points.length.
8
9
// It is guaranteed that there exists at least one pair of points that satisfy the constraint |xi - xj| <= k.
0 commit comments