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

Given an array of intervals intervals where intervals[i] = [starti, endi], return the minimum number of intervals you need to remove to make the rest of the intervals non-overlapping.
Note that intervals which only touch at a point are non-overlapping. For example, [1, 2] and [2, 3] are non-overlapping.
 
Please complete the following python code precisely:
```python
class Solution:
    def eraseOverlapIntervals(self, intervals: List[List[int]]) -> int:
```