mirror of
https://github.com/krahets/hello-algo.git
synced 2026-04-14 10:20:40 +08:00
Several bug fixes.
This commit is contained in:
@@ -37,7 +37,7 @@ class HashMapChaining {
|
||||
}
|
||||
|
||||
/* 查询操作 */
|
||||
public string get(int key) {
|
||||
public string? get(int key) {
|
||||
int index = hashFunc(key);
|
||||
// 遍历桶,若找到 key 则返回对应 val
|
||||
foreach (Pair pair in buckets[index]) {
|
||||
|
||||
Reference in New Issue
Block a user