Given an integer array nums, return the maximum result of nums[i] XOR nums[j]. Example: For , the maximum XOR is ().
Naive approach: try all pairs in . The trie approach: store numbers as binary strings in a trie.
For each number, traverse the trie trying to go the opposite direction at each bit (maximizing XOR). Constraints: to numbers, each from to .