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

Given a sorted integer array nums and an integer n, add/patch elements to the array such that any number in the range [1, n] inclusive can be formed by the sum of some elements in the array.
Return the minimum number of patches required.
 
Please complete the following python code precisely:
```python
class Solution:
    def minPatches(self, nums: List[int], n: int) -> int:
```