Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa7b64c

Browse files
refactor 1014
1 parentd215a49 commitfa7b64c

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

‎src/main/java/com/fishercoder/solutions/_1014.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,5 @@
11
packagecom.fishercoder.solutions;
22

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-
193
publicclass_1014 {
204
publicstaticclassSolution1 {
215
publicintmaxScoreSightseeingPair(int[]A) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp