Given an array of positive integers, partition it into two subsets such that the absolute difference of their sums is minimized. Return that minimum difference. This is a standard partition-style optimization problem.
nums = array of positive integers
minimum possible absolute difference between subset sums
Example 1:
Input:
nums = [1,6,11,5]
Output:
1
Explanation:
One partition is [1,6,5] and [11], with difference 1.
Example 2:
Input:
nums = [3,9,7,3]
Output:
2
Explanation:
A best partition difference of 2 is achievable.