This commit is contained in:
krahets
2023-07-26 15:34:46 +08:00
parent f8f7086196
commit 7351ec70a6
53 changed files with 439 additions and 329 deletions

View File

@@ -228,7 +228,7 @@ index = hash(key) % capacity
}
```
=== "JavaScript"
=== "JS"
```javascript title="simple_hash.js"
[class]{}-[func]{addHash}
@@ -240,7 +240,7 @@ index = hash(key) % capacity
[class]{}-[func]{rotHash}
```
=== "TypeScript"
=== "TS"
```typescript title="simple_hash.ts"
[class]{}-[func]{addHash}
@@ -542,13 +542,13 @@ $$
```
=== "JavaScript"
=== "JS"
```javascript title="built_in_hash.js"
```
=== "TypeScript"
=== "TS"
```typescript title="built_in_hash.ts"

View File

@@ -465,13 +465,13 @@ comments: true
}
```
=== "JavaScript"
=== "JS"
```javascript title="hash_map_chaining.js"
[class]{HashMapChaining}-[func]{}
```
=== "TypeScript"
=== "TS"
```typescript title="hash_map_chaining.ts"
[class]{HashMapChaining}-[func]{}
@@ -1321,13 +1321,13 @@ comments: true
}
```
=== "JavaScript"
=== "JS"
```javascript title="hash_map_open_addressing.js"
[class]{HashMapOpenAddressing}-[func]{}
```
=== "TypeScript"
=== "TS"
```typescript title="hash_map_open_addressing.ts"
[class]{HashMapOpenAddressing}-[func]{}

View File

@@ -126,7 +126,7 @@ comments: true
delete(mapp, 10583)
```
=== "JavaScript"
=== "JS"
```javascript title="hash_map.js"
/* 初始化哈希表 */
@@ -148,7 +148,7 @@ comments: true
map.delete(10583);
```
=== "TypeScript"
=== "TS"
```typescript title="hash_map.ts"
/* 初始化哈希表 */
@@ -333,7 +333,7 @@ comments: true
}
```
=== "JavaScript"
=== "JS"
```javascript title="hash_map.js"
/* 遍历哈希表 */
@@ -351,7 +351,7 @@ comments: true
}
```
=== "TypeScript"
=== "TS"
```typescript title="hash_map.ts"
/* 遍历哈希表 */
@@ -835,7 +835,7 @@ index = hash(key) % capacity
}
```
=== "JavaScript"
=== "JS"
```javascript title="array_hash_map.js"
/* 键值对 Number -> String */
@@ -924,7 +924,7 @@ index = hash(key) % capacity
}
```
=== "TypeScript"
=== "TS"
```typescript title="array_hash_map.ts"
/* 键值对 Number -> String */