We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4f37b26 commit 601e928Copy full SHA for 601e928
src/main/java/g3501_3600/s3572_maximize_ysum_by_picking_a_triplet_of_distinct_xvalues/Solution.java
@@ -19,7 +19,6 @@ public int maxSumDistinctTriplet(int[] x, int[] y) {
19
return -1;
20
}
21
int index2 = -1;
22
- int index3 = -1;
23
max = -1;
24
for (int i = 0; i < y.length; i++) {
25
if (y[i] > max && x[i] != x[index]) {
@@ -35,7 +34,6 @@ public int maxSumDistinctTriplet(int[] x, int[] y) {
35
34
36
if (y[i] > max && x[i] != x[index] && x[i] != x[index2]) {
37
max = y[i];
38
- index3 = i;
39
40
41
if (max == -1) {
0 commit comments