Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Let's note that for the XOR of all segments with size K to be equal to zeros, nums[i] has to be equal to nums[i+k]
Basically, we need to make the first K elements have XOR = 0 and then modify them.