Given a nums.
The effective value of a triplet of indices (i, j, k) is calculated as ((nums[i] | nums[j]) & nums[k]).
The XOR beauty of the array is defined as the bitwise XOR sum of the effective values of all possible index triplets (i, j, k) satisfying i, j, k nums.length.
Return the XOR beauty of nums.
Constraints:
nums.length
nums[i]
Given a nums.
The effective value of a triplet of indices (i, j, k) is calculated as ((nums[i] | nums[j]) & nums[k]).
The XOR beauty of the array is defined as the bitwise XOR sum of the effective values of all possible index triplets (i, j, k) satisfying i, j, k nums.length.
Return the XOR beauty of nums.
Constraints:
nums.length
nums[i]