input: Write a python function to partition an array into two subsets with equal sum.
  assert partition_equal([1, 5, 11, 5])==True
  assert partition_equal([1, 2, 3, 5])==False
  assert partition_equal([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10])==False
output: def partition_equal(nums):
      total_sum = sum(nums)
      if total_sum % 2 != 0:
          return False
  
      target = total_sum // 2
      n = len(nums)
      dp = [False] * (target + 1)
      dp[0] = True
  
      for num in nums:
          for j in range(target, num - 1, -1):
              dp[j] = dp[j] or dp[j - num]
  
      return dp[target]