commit 568e811275f446c89491c86fdccf363fbeebdb8d
parent 6423deba6fce7bdafdc444a904dcf0ff58169bd3
Author: ling0x <ling0x@users.noreply.github.com>
Date: Sun, 12 Apr 2026 18:45:12 +0100
optimizations
Diffstat:
1 file changed, 0 insertions(+), 5 deletions(-)
diff --git a/src/hash_table/two_sum.rs b/src/hash_table/two_sum.rs
@@ -1,7 +1,3 @@
-use std::collections::HashMap;
-
-use tracing::info;
-
// First try - brute force approach without optimization
// 101ms, 2.37MB
pub fn two_sum_1(nums: Vec<i32>, target: i32) -> Vec<i32> {
@@ -159,7 +155,6 @@ pub fn two_sum_8(nums: Vec<i32>, target: i32) -> Vec<i32> {
result
}
-// Best solution
// 0ms 2.56MB
//
// Whenever you build a map over a whole collection before querying it,