Skip to content

Commit df1440e

Browse files
authored
Updated README for clarity
There was a typo in the line that has been changed. The sentence itself has been altered slightly to accommodate the fix for the typo and maintain clarity.
1 parent 50d83b7 commit df1440e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Hash Table/README.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ it first hashes the key `"lastName"` to calculate the array index, which is 3. S
103103

104104
Common ways to implement this chaining mechanism are to use a linked list or another array. Since the order of the items in the chain does not matter, you can think of it as a set instead of a list. (Now you can also imagine where the term "bucket" comes from; we just dump all the objects together into the bucket.)
105105

106-
Chains should not become long because the slow process of looking up items in the hash table. Ideally, we would have no chains at all, but in practice it is impossible to avoid collisions. You can improve the odds by giving the hash table enough buckets using high-quality hash functions.
106+
Chains should not become long because looking up items in the hash table would become a slow process. Ideally, we would have no chains at all, but in practice it is impossible to avoid collisions. You can improve the odds by giving the hash table enough buckets using high-quality hash functions.
107107

108108
> **Note:** An alternative to chaining is "open addressing". The idea is this: if an array index is already taken, we put the element in the next unused bucket. This approach has its own upsides and downsides.
109109

0 commit comments

Comments
 (0)