You are given an integer array values, where values[i] represents the score of the sightseeing spot at index i. Choose two different indices i and j such that values[i] + values[j] + i - j.
Return the maximum possible score over all valid pairs.
Constraints:
values.length
values[i]
You are given an integer array values, where values[i] represents the score of the sightseeing spot at index i. Choose two different indices i and j such that values[i] + values[j] + i - j.
Return the maximum possible score over all valid pairs.
Constraints:
values.length
values[i]