Available question text
Given an array values, find the maximum score values[i] + values[j] + i - j for i < j, which reduces to maximizing (values[i] + i) + (values[j] - j); the optimal O(n) approach scans once while tracking the best left term.
Related questions
Continue with questions that share topics or the same question type.
- Best Meeting Point
Coding
- Best Poker Hand
Coding
- Best Position for a Service Centre
Coding
- Best Team With No Conflicts
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 1014. Best Sightseeing Pair
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source