Find XOR Sum of All Pairs Bitwise AND LeetCode solution in Java

1
class Solution {
2
public int getXORSum(int[] arr1, int[] arr2) {
3

4
int xor1 = 0, xor2 = 0;
5

6
for (int arr : arr1) {
7
xor1 ^= arr;
8
}
9

10
for (int arr : arr2) {
11
xor2 ^= arr;
12
}
13

14
return xor1 & xor2;
15
}
16
}

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0