Skip to main content

No project description provided

Project description

hash-table

Custom hash table implementation that tries to replicate built-in Python dictionary. The aim is to better understand its functioning and apply TDD framework to test core functionalities.

Getting started

Missing

Technical Documentation

hash table key features

If you have any new feature, feel free to create a MR explaining this feature and I'll add that to the list

requirement included
Create an empty hash table
Insert a key-value pair
Accept arbitrary key type
Get a key-value pair
Delete a key-value pair
Update the value associated with an existing key
Hash table is iterable
Possible to compare to hash tables
Possible to convert python dictionary
String representation
Union operation
Miscellaneous (dict.clear() dict.update()
Managing Hash collision: linear probing
Managing Hash collision: separate chaining
Dynamic resizing
Retain insertion order

Features documentation

Missing

Improve performances

At the moment the actual performances are not comparable to python built-in dictionary. I've identified two key pain points that I want to improve in the search f a key:

  1. setitem uses string comparison, which is costly (O(N)). Want to move to hash comparison
  2. delitem has to remove key from a list in linear time (O(N)). Want to move away from lists to improve search, without loosing the key insertion order

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hash_table_at-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hash_table_at-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file hash_table_at-0.1.0.tar.gz.

File metadata

  • Download URL: hash_table_at-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.1.0

File hashes

Hashes for hash_table_at-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9f4b90eca2e209b847e0553ba92edec73932a70022cdf66419bf16c2b0d87a79
MD5 265e464a4ddcd385b007dca21b95eb0c
BLAKE2b-256 1ad4ac674bc81e65a4cd70f27bff54675f0a58bd532efdfe7374ab19801623fb

See more details on using hashes here.

File details

Details for the file hash_table_at-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: hash_table_at-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Darwin/23.1.0

File hashes

Hashes for hash_table_at-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d78c5f6a690d44ddf684e443b41bcdc47a48b9a6d1de38189aeccbb168e60213
MD5 ad26747099ee03fab664b9eb7ddde243
BLAKE2b-256 3a8680d6f898603d6ca8dd3ced86fb67345b96d7a7eec3d990d409894b477cc9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page