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

You are given a 0-indexed m x n binary matrix grid.
In one operation, you can choose any i and j that meet the following conditions:

0 <= i < m
0 <= j < n
grid[i][j] == 1

and change the values of all cells in row i and column j to zero.
Return the minimum number of operations needed to remove all 1's from grid.
 
Please complete the following python code precisely:
```python
class Solution:
    def removeOnes(self, grid: List[List[int]]) -> int:
```