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

On a 2D plane, we place n stones at some integer coordinate points. Each coordinate point may have at most one stone.
A stone can be removed if it shares either the same row or the same column as another stone that has not been removed.
Given an array stones of length n where stones[i] = [xi, yi] represents the location of the ith stone, return the largest possible number of stones that can be removed.
 
Please complete the following python code precisely:
```python
class Solution:
    def removeStones(self, stones: List[List[int]]) -> int:
```