Maximum XOR With an Element From Array
Insert the numbers into a binary trie that stores the smallest value under each node, so a query can skip every branch whose values exceed its limit.
Insert the numbers into a binary trie that stores the smallest value under each node, so a query can skip every branch whose values exceed its limit.