Several bug fixes.

This commit is contained in:
krahets
2023-10-29 00:09:54 +08:00
parent c37f0981f0
commit db5d1d21f3
9 changed files with 14 additions and 17 deletions

View File

@@ -25,7 +25,7 @@ typedef struct {
// 函数声明
void extend(HashMapOpenAddressing *hashMap);
/* 构造方法 */
/* 构造函数 */
HashMapOpenAddressing *newHashMapOpenAddressing() {
HashMapOpenAddressing *hashMap = (HashMapOpenAddressing *)malloc(sizeof(HashMapOpenAddressing));
hashMap->size = 0;
@@ -40,7 +40,7 @@ HashMapOpenAddressing *newHashMapOpenAddressing() {
return hashMap;
}
/* 析构方法 */
/* 析构函数 */
void delHashMapOpenAddressing(HashMapOpenAddressing *hashMap) {
for (int i = 0; i < hashMap->capacity; i++) {
Pair *pair = hashMap->buckets[i];