Skip to content

Commit

Permalink
fix: comments
Browse files Browse the repository at this point in the history
  • Loading branch information
khoaxuantu committed Apr 14, 2024
1 parent 07638b0 commit 2f64bef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion codes/ruby/chapter_hashing/hash_map_chaining.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ def get(key)

### 添加操作 ###
def put(key, val)
extend if load_factor > @load_thres
# 当负载因子超过阈值时,执行扩容
extend if load_factor > @load_thres
index = hash_func(key)
bucket = @buckets[index]
# 遍历桶,若遇到指定 key ,则更新对应 val 并返回
Expand Down

0 comments on commit 2f64bef

Please sign in to comment.