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

You are given an integer array nums. You want to maximize the number of points you get by performing the following operation any number of times:

Pick any nums[i] and delete it to earn nums[i] points. Afterwards, you must delete every element equal to nums[i] - 1 and every element equal to nums[i] + 1.

Return the maximum number of points you can earn by applying the above operation some number of times.
 
Please complete the following python code precisely:
```python
class Solution:
    def deleteAndEarn(self, nums: List[int]) -> int:
```