561. Array Partition
Easy
Given an integer array nums
of 2n
integers, group these integers into n
pairs (a1, b1), (a2, b2), ..., (an, bn)
such that the sum of min(ai, bi)
for all i
is maximized. Return the maximized sum.
Example 1:
Example 2:
Constraints:
1 <= n <= 104
nums.length == 2 * n
-104 <= nums[i] <= 104
解題
Last updated