Available question text
Given points sorted by x, find the maximum value of yi + yj + |xi - xj| for pairs with |xi - xj| ≤ k. Transforming the expression to (yi - xi) + (yj + xj) for i < j shows you must efficiently maintain the maximum (yi - xi) among prior points within an x-distance k to evaluate each j.
Related questions
Continue with questions that share topics or the same question type.
- Add Consecutive-Value Bonuses to Grid Paths
Coding
- Average Value of Even Numbers That Are Divisible by Three
Coding
- Build a File-Backed Key-Value Store
Coding · File & Media Storage · Key-Value Stores
- Build the Equation
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 1499. Max Value of Equation
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source