mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-23 16:47:13 +00:00
Bug fixes and improvements (#1813)
* Sync zh and zh-hant version. * Add the Warp sponsor banner. * Update README with acknowledgments and Warp recommendation Added acknowledgments and a recommendation for the Warp terminal application. * Update README.md * Update links in README.md to use HTTPS * Sync zh and zh-hant versions. * Add special thanks for Warp spnsorship. * Use official warp image link.
This commit is contained in:
@@ -559,7 +559,7 @@
|
||||
輸入一個 `key` ,雜湊函式的計算過程分為以下兩步。
|
||||
|
||||
1. 透過某種雜湊演算法 `hash()` 計算得到雜湊值。
|
||||
2. 將雜湊值對桶數量(陣列長度)`capacity` 取模,從而獲取該 `key` 對應的陣列索引 `index` 。
|
||||
2. 將雜湊值對桶數量(陣列長度)`capacity` 取模,從而獲取該 `key` 對應的桶(陣列索引)`index` 。
|
||||
|
||||
```shell
|
||||
index = hash(key) % capacity
|
||||
|
||||
Reference in New Issue
Block a user