mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-16 08:56:05 +00:00
Add figures to replace_linear_by_hashing.md
This commit is contained in:
@@ -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]]
|
||||
|
||||
+2
-2
@@ -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 ======
|
||||
// 方法一
|
||||
Reference in New Issue
Block a user