NeetCode #800LC-1014MediumGreedy
← Back to All Problems#800 · #1014 · Best Sightseeing Pair(最佳观光组合)
📌 Problem Statement & Constraints
Given an array
values, the score of a pair (i, j) with i < j is values[i] + values[j] + i - j. Return the maximum score. Constraints: 2 <= values.length <= 5 * 10^4, 1 <= values[i] <= 1000.🔒
Sign In to Unlock Full Solutions for All 973 Problems
Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!