mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-09 22:16:06 +00:00
build
This commit is contained in:
@@ -178,7 +178,7 @@ comments: true
|
||||
|
||||
```javascript title="hash_map.js"
|
||||
/* 初始化哈希表 */
|
||||
const map = new ArrayHashMap();
|
||||
const map = new Map();
|
||||
/* 添加操作 */
|
||||
// 在哈希表中添加键值对 (key, value)
|
||||
map.set(12836, '小哈');
|
||||
@@ -349,7 +349,7 @@ comments: true
|
||||
Console.WriteLine(key);
|
||||
}
|
||||
// 单独遍历值 value
|
||||
foreach (String val in map.Values) {
|
||||
foreach (string val in map.Values) {
|
||||
Console.WriteLine(val);
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user