Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given an array nums​​​ and an integer k​​​​​. The XOR of a segment [left, right] where left <= right is the XOR of all the elements with indices between left and right, inclusive: nums[left] XOR nums[left+1] XOR ... XOR nums[right].
Return the minimum number of elements to change in the array such that the XOR of all segments of size k​​​​​​ is equal to zero.
 
Please complete the following python code precisely:
```python
class Solution:
    def minChanges(self, nums: List[int], k: int) -> int:
```