HashMaps/README.md

13 lines
738 B
Markdown
Raw Permalink Normal View History

2022-05-31 23:13:31 -04:00
# HashMaps
2022-06-05 00:11:45 -04:00
These two hash map implementations feature open addressing with quadratic probing
2022-06-25 13:47:52 -04:00
and separate chaining to handle collisions. The hm\_include module provides the
2022-06-05 00:11:45 -04:00
underlying data structures, and two hash functions.
Both implementations use the included DynamicArray class for the underlying hash table,
however hash\_map\_sc.py uses a singly linked list for each bucket while hash\_map\_oa.py
uses a HashEntry object. Additionally, hash\_map\_sc.py includes a seperate function,
find\_mode(), that provides a mechanism for finding the value that occurs most
2022-06-05 00:14:15 -04:00
frequently in the hash map and how many times it occurs with an O(n) time complexity.
2022-06-25 13:47:52 -04:00
Finally, both implementations include some basic testing when run as a script.