The Codetikki cryptographers encode messages using XOR. They need to find two numbers in an array whose XOR is the maximum possible. Given an array of integers, find the maximum XOR of any two elements.
Example 1:
Example 2:
Constraints:
1 <= n <= 10^5 0 <= arr[i] <= 2^31 - 1
Tags:
