Skip to content

Commit f4b9875

Browse files
committed
Runtime: 11 ms (Top 68.46%) | Memory: 54.3 MB (Top 56.38%)
1 parent 65b91fd commit f4b9875

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

scripts/algorithms/G/Greatest Sum Divisible by Three/Greatest Sum Divisible by Three.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
// Runtime: 11 ms (Top 68.46%) | Memory: 54.3 MB (Top 56.38%)
2+
13
class Solution {
24

35
public int maxSumDivThree(int[] nums) {
@@ -26,7 +28,7 @@ public int maxSumDivThree(int[] nums) {
2628
} else if (b % 3 == 2) {
2729
nr2 = Math.max(nr2, b);
2830
}
29-
31+
3032
if (c % 3 == 0) {
3133
nr0 = Math.max(nr0, c);
3234
} else if (c % 3 == 1) {
@@ -38,7 +40,7 @@ public int maxSumDivThree(int[] nums) {
3840
r1=nr1;
3941
r2=nr2;
4042
}
41-
43+
4244
return r0;
4345
}
44-
}
46+
}

0 commit comments

Comments
 (0)