Maximum XOR
hardFind maximum XOR of any two numbers in array
Maximum XOR
Key Insight
XOR is maximized when bits differ most. Compare all pairs (optimal: Trie).
Step 1Problem
No binary data
Find max XOR of any two numbers in [3, 10, 5, 25, 2, 8].
1 / 5