Add figures to replace_linear_by_hashing.md

This commit is contained in:
krahets
2023-05-09 00:36:18 +08:00
parent 53ca2144e2
commit fe69f7240d
23 changed files with 85 additions and 80 deletions
+3 -3
View File
@@ -19,10 +19,10 @@ path = "chapter_computational_complexity/worst_best_time_complexity.rs"
name = "space_complexity"
path = "chapter_computational_complexity/space_complexity.rs"
# Run Command: cargo run --bin leetcode_two_sum
# Run Command: cargo run --bin two_sum
[[bin]]
name = "leetcode_two_sum"
path = "chapter_computational_complexity/leetcode_two_sum.rs"
name = "two_sum"
path = "chapter_computational_complexity/two_sum.rs"
# Run Command: cargo run --bin array
[[bin]]
@@ -1,5 +1,5 @@
/*
* File: leetcode_two_sum.rs
* File: two_sum.rs
* Created Time: 2023-01-14
* Author: xBLACICEx (xBLACKICEx@outlook.com), sjinzh (sjinzh@gmail.com)
*/
@@ -39,7 +39,7 @@ pub fn two_sum_hash_table(nums: &Vec<i32>, target: i32) -> Option<Vec<i32>> {
fn main() {
// ======= Test Case =======
let nums = vec![ 2, 7, 11, 15 ];
let target = 9;
let target = 13;
// ====== Driver Code ======
// 方法一