Problem 2997 · Medium

Minimum Number of Operations to Make Array XOR Equal to K

Fold the array with XOR, then count the bits where that result differs from k, since each bit flip fixes one.

Open the interactive visualisation