DSA Key Problems

Maximum XOR With an Element From Array

Given an integer array and queries containing a value and an upper limit, return for each query the maximum XOR with an array value not exceeding that limit, or -1 if no value qualifies.