mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-13 12:20:57 +00:00
fix: Several code bug fixes (#973)
* Update counting_sort.c and quick_sort.c * Code bug fixes.
This commit is contained in:
@@ -132,7 +132,7 @@ void put(HashMapChaining *hashMap, int key, const char *val) {
|
||||
}
|
||||
cur = cur->next;
|
||||
}
|
||||
// 若无该 key ,则将键值对添加至尾部
|
||||
// 若无该 key ,则将键值对添加至链表头部
|
||||
Pair *newPair = (Pair *)malloc(sizeof(Pair));
|
||||
newPair->key = key;
|
||||
strcpy(newPair->val, val);
|
||||
|
||||
Reference in New Issue
Block a user