Max XOR of Two Numbers

Given an integer array nums, find the maximum value of nums[i] XOR nums[j] for any 0 <= i < j < nums.length. The XOR of two numbers is maximized when they differ in the most significant bits possible.

Examples
Input: []
Output: 0
Hints

Max XOR of Two Numbers

Given an integer array nums, find the maximum value of nums[i] XOR nums[j] for any 0 <= i < j < nums.length. The XOR of two numbers is maximized when they differ in the most significant bits possible.