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

You are given an integer array nums and an integer k.
In one operation, you can pick two numbers from the array whose sum equals k and remove them from the array.
Return the maximum number of operations you can perform on the array.
 
Please complete the following python code precisely:
```python
class Solution:
    def maxOperations(self, nums: List[int], k: int) -> int:
```