Coding Challenge

Maximum XOR of Two Numbers in an Array

Medium
bit-manipulationtrie

Find the maximum XOR value of any pair in the array.

Given an integer array, return the maximum XOR value obtainable from any two numbers.

Examples

Input: nums = [3,10,5,25,2,8]

Output: 28

Constraints

  • 1 <= nums.length

Preparing your coding workspace...