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

Given an integer array nums, return the number of reverse pairs in the array.
A reverse pair is a pair (i, j) where:

0 <= i < j < nums.length and
nums[i] > 2 * nums[j].

 
Please complete the following python code precisely:
```python
class Solution:
    def reversePairs(self, nums: List[int]) -> int:
```