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

Given an integer array nums, return true if you can partition the array into two subsets such that the sum of the elements in both subsets is equal or false otherwise.
 
Please complete the following python code precisely:
```python
class Solution:
    def canPartition(self, nums: List[int]) -> bool:
```