Problem Description
Given two integer array A and B, you have to pick one element from each array such that their xor is maximum.
Return this maximum xor value.
1 <= |A|, |B| <= 105
1 <= A[i], B[i] <= 109
First argument is an integer array A.
Second argument is an integer array B.
Return an integer denoting the maximum xor value as described in the question.
Input 1:
A = [1, 2, 3] B = [4, 1, 2]
Output 1:
7
Explanation 1:
Pick A[2] and B[0] because their xor value is maximum. 3 ^ 4 = 7
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.