mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-25 23:06:29 +08:00
Update JavaScript style (Chapter of Hashing)
This commit is contained in:
parent
650872cb05
commit
60c715b041
2 changed files with 2 additions and 2 deletions
|
@ -14,7 +14,7 @@ class Entry {
|
||||||
|
|
||||||
/* 基于数组简易实现的哈希表 */
|
/* 基于数组简易实现的哈希表 */
|
||||||
class ArrayHashMap {
|
class ArrayHashMap {
|
||||||
#bucket
|
#bucket;
|
||||||
constructor() {
|
constructor() {
|
||||||
// 初始化一个长度为 100 的桶(数组)
|
// 初始化一个长度为 100 的桶(数组)
|
||||||
this.#bucket = new Array(100).fill(null);
|
this.#bucket = new Array(100).fill(null);
|
||||||
|
|
|
@ -539,7 +539,7 @@ $$
|
||||||
|
|
||||||
/* 基于数组简易实现的哈希表 */
|
/* 基于数组简易实现的哈希表 */
|
||||||
class ArrayHashMap {
|
class ArrayHashMap {
|
||||||
#bucket
|
#bucket;
|
||||||
constructor() {
|
constructor() {
|
||||||
// 初始化一个长度为 100 的桶(数组)
|
// 初始化一个长度为 100 的桶(数组)
|
||||||
this.#bucket = new Array(100).fill(null);
|
this.#bucket = new Array(100).fill(null);
|
||||||
|
|
Loading…
Reference in a new issue