Sponsored
Sponsored
Solve with full IDE support and test cases
Use these hints if you're stuck. Try solving on your own first.
Calculate the bitwise <code>XOR</code> of all elements of the original array and compare it to <code>k</code> in their binary representation.
For each different bit between the bitwise <code>XOR</code> of elements of the original array and <code>k</code> we have to flip <strong>exactly</strong> one bit of an element in <code>nums</code> to make that bit equal.