Maximum XOR of Two Numbers
Return the largest value of nums[i] ^ nums[j] (bitwise XOR) over all pairs of positions i and j. The two positions may be equal, which gives 0.
Example 1
nums [3,10,5,25,2,8]
returns 28
5 ^ 25 = 28.
Constraints
1 <= len(nums) <= 1000 <= nums[i] <= 1000
Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.