mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-12 15:36:05 +00:00
build
This commit is contained in:
@@ -1239,10 +1239,10 @@ comments: true
|
||||
|
||||
/* 求解子集和 II */
|
||||
vector *subsetSumII(vector *nums, int target) {
|
||||
vector *state = newVector(); // 状态(子集)
|
||||
vector *state = newVector(); // 状态(子集)
|
||||
qsort(nums->data, nums->size, sizeof(int *), comp); // 对 nums 进行排序
|
||||
int start = 0; // 子集和
|
||||
vector *res = newVector(); // 结果列表(子集列表)
|
||||
int start = 0; // 子集和
|
||||
vector *res = newVector(); // 结果列表(子集列表)
|
||||
backtrack(state, target, nums, start, res);
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user