fix: Several code bug fixes (#973)

* Update counting_sort.c and quick_sort.c

* Code bug fixes.
This commit is contained in:
Yudong Jin
2023-11-29 23:14:55 +08:00
committed by GitHub
parent 56b20eff36
commit b824d149cb
4 changed files with 4 additions and 6 deletions
+1 -1
View File
@@ -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);