mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-13 04:10:58 +00:00
fix: check the rust codes and fix them (#653)
* fix: check the rust codes and fix it * Update binary_tree_bfs.rs --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
@@ -29,8 +29,8 @@ fn backtrack(mut state: Vec<i32>, target: i32, total: i32, choices: &[i32], res:
|
||||
/* 求解子集和 I(包含重复子集) */
|
||||
fn subset_sum_i_naive(nums: &[i32], target: i32) -> Vec<Vec<i32>> {
|
||||
let state = Vec::new(); // 状态(子集)
|
||||
let total = 0;
|
||||
let mut res = Vec::new();
|
||||
let total = 0; // 子集和
|
||||
let mut res = Vec::new(); // 结果列表(子集列表)
|
||||
backtrack(state, target, total, nums, &mut res);
|
||||
res
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user