Skip to content

Commit 1726004

Browse files
RobadobJostMigenda
andauthored
Update learners/technical-appendix.md
Co-authored-by: Jost Migenda <[email protected]>
1 parent 3425ca4 commit 1726004

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

learners/technical-appendix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ However all is not lost, packages such as `numpy` and `pandas` implemented in C/
186186

187187
Within a hashing data structure (such as a dictionary or set) each inserted key is hashed to produce a (preferably unique) integer key, which serves as the basis for indexing. Dictionaries are initialized with a default size, and the initial index of a key is determined by its hash value, modulo the dictionary's length. If this index is available, the key and its associated value are stored there. If the index is already occupied, a collision occurs, and a resolution strategy is applied to find an alternate index.
188188

189-
In CPython's [dictionary](https://github.com/python/cpython/blob/main/Objects/dictobject.c) and [set](https://github.com/python/cpython/blob/main/Objects/setobject.c)implementations, a technique called open addressing is employed. This approach modifies the hash and probes subsequent indices until an empty one is found.
189+
In CPython's [dictionary](https://github.com/python/cpython/blob/main/Objects/dictobject.c) and [set](https://github.com/python/cpython/blob/main/Objects/setobject.c) implementations, a technique called open addressing is employed. This approach modifies the hash and probes subsequent indices until an empty one is found.
190190

191191
When a dictionary or hash table in Python grows, the underlying storage is resized, which necessitates re-inserting every existing item into the new structure. This process can be computationally expensive but is essential for maintaining efficient average probe times when searching for keys.
192192

0 commit comments

Comments
 (0)