Make Array XOR Equal to K

You can flip any individual bit in any element of the array. Each flip toggles a single bit from 0 to 1 or vice versa. Find the minimum number of such flips needed so that the XOR of all array elements equals a target value k.

Examples
Input: [[2,2,1],1]
Output: 0
Hints

Make Array XOR Equal to K

You can flip any individual bit in any element of the array. Each flip toggles a single bit from 0 to 1 or vice versa. Find the minimum number of such flips needed so that the XOR of all array elements equals a target value `k`.