Given an integer array nums, return true if you can partition the array into two subsets such that the sum of elements in both subsets is equal.
Input: nums = [1,5,11,5]
Output: true
Explanation: [1,5,5] and [11].
Topics: dp, arrays
Asked by: Amazon, Google, Meta, Microsoft, Apple
Time complexity: O(n × target). Space complexity: O(target).