File tree Expand file tree Collapse file tree 1 file changed +0
-16
lines changed
src/main/java/com/fishercoder/solutions Expand file tree Collapse file tree 1 file changed +0
-16
lines changed Original file line number Diff line number Diff line change 1
1
package com .fishercoder .solutions ;
2
2
3
- /**
4
- * 1014. Best Sightseeing Pair
5
- *
6
- * Given an array A of positive integers, A[i] represents the value of the i-th sightseeing spot,
7
- * and two sightseeing spots i and j have distance j - i between them.
8
- *
9
- * The score of a pair (i < j) of sightseeing spots is (A[i] + A[j] + i - j) :
10
- * the sum of the values of the sightseeing spots, minus the distance between them.
11
- *
12
- * Return the maximum score of a pair of sightseeing spots.
13
- *
14
- * Note:
15
- * * 2 <= A.length <= 50000
16
- * * 1 <= A[i] <= 1000
17
- */
18
-
19
3
public class _1014 {
20
4
public static class Solution1 {
21
5
public int maxScoreSightseeingPair (int [] A ) {
You can’t perform that action at this time.
0 commit comments