Skip to content

Commit fc0109b

Browse files
committed
Runtime: 5 ms (Top 20.60%) | Memory: 66.5 MB (Top 16.04%)
1 parent 85fbfbf commit fc0109b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/M/Maximum Points You Can Obtain from Cards/Maximum Points You Can Obtain from Cards.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 5 ms (Top 20.60%) | Memory: 66.5 MB (Top 16.04%)
12
class Solution {
23
public int maxScore(int[] cardPoints, int k) {
34
int n = cardPoints.length;
@@ -20,9 +21,9 @@ public int maxScore(int[] cardPoints, int k) {
2021
else{
2122
subsum = totalSum[j]-totalSum[i-1];
2223
}
23-
24+
2425
score = Math.max(score,sum-subsum);
2526
}
2627
return score;
2728
}
28-
}
29+
}

0 commit comments

Comments
 (0)