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

Given an array of intervals where intervals[i] = [starti, endi], merge all overlapping intervals, and return an array of the non-overlapping intervals that cover all the intervals in the input.
 
Please complete the following python code precisely:
```python
class Solution:
    def merge(self, intervals: List[List[int]]) -> List[List[int]]:
```