We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4b197cb + 3214001 commit 90d3ca8Copy full SHA for 90d3ca8
src/main/java/g3001_3100/s3068_find_the_maximum_sum_of_node_values/Solution.java
@@ -4,10 +4,11 @@
4
// #2024_03_31_Time_1_ms_(100.00%)_Space_54.5_MB_(67.07%)
5
6
public class Solution {
7
- public long maximumValueSum(int[] A, int k, int[][] edges) {
+ public long maximumValueSum(int[] nums, int k, int[][] edges) {
8
long res = 0;
9
- int d = 1 << 30, c = 0;
10
- for (int a : A) {
+ int d = 1 << 30;
+ int c = 0;
11
+ for (int a : nums) {
12
int b = a ^ k;
13
res += Math.max(a, b);
14
c ^= a < b ? 1 : 0;
src/main/java/g3001_3100/s3069_distribute_elements_into_two_arrays_i/Solution.java
@@ -4,7 +4,8 @@
public int[] resultArray(int[] nums) {
- int s = 0, t = 1;
+ int s = 0;
+ int t = 1;
for (int i = 2; i < nums.length; i++) {
int p = i;
if (nums[s] > nums[t]) {
0 commit comments