Largest Equivalent Set of Pairs
题目地址(483. Largest Equivalent Set of Pairs)
题目描述
Given a list of integers nums, find two sets such that their sums are equal and is maximized, and return one of the sets' sums.
Note that not all integers in nums need to be used and the two sets may be empty. A number cannot be in both of the two sets.
Constraints
n ≤ 30 where n is the length of nums
0 ≤ nums[i] ≤ 100
Example 1
Input
nums = [1, 4, 3, 5]
Output
5
Explanation
The two sets are [1, 4] and [5].前置知识
思路
代码
最后更新于
这有帮助吗?