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:
Night Cruising
2023-07-24 22:27:26 +08:00
committed by GitHub
parent 978d3c2ed7
commit fdbe275fc9
18 changed files with 167 additions and 102 deletions
@@ -34,7 +34,7 @@ pub fn main() {
// 初始化哈希表
let mut map = HashMap::new();
for (i, num) in nums.iter().enumerate() {
map.insert(*num, i);
map.insert(*num, i); // key: 元素,value: 索引
}
let index = hashing_search_array(&map, target);
println!("目标元素 3 的索引 = {}", index.unwrap());