Tap here to switch tabs
Problem
Submissions

Problem: Maximum XOR of Subsequences

Maximum XOR of Subsequences asks you to choose two subsequences of an integer array, XOR each one's elements, and return the largest XOR of the two resulting values.

Statement

You are given an integer array nums.

Select two subsequences from nums and calculate the bitwise XOR sum of the elements for each subsequence.

Return the maximum possible bitwise XOR value of the two XOR sums.

Constraints:

  • 2≤2 \leq nums.length ≤105\leq 10^5

  • 0≤0 \leq nums[i] ≤109\leq 10^9

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Maximum XOR of Subsequences

Maximum XOR of Subsequences asks you to choose two subsequences of an integer array, XOR each one's elements, and return the largest XOR of the two resulting values.

Statement

You are given an integer array nums.

Select two subsequences from nums and calculate the bitwise XOR sum of the elements for each subsequence.

Return the maximum possible bitwise XOR value of the two XOR sums.

Constraints:

  • 2≤2 \leq nums.length ≤105\leq 10^5

  • 0≤0 \leq nums[i] ≤109\leq 10^9