https://github.com/rishabh672003/hash-table-in-cpp
A very simple hash table implementation in CPP
https://github.com/rishabh672003/hash-table-in-cpp
cmake cpp cpp20 data-structures hash hash-table hashing
Last synced: 3 months ago
JSON representation
A very simple hash table implementation in CPP
- Host: GitHub
- URL: https://github.com/rishabh672003/hash-table-in-cpp
- Owner: Rishabh672003
- License: gpl-3.0
- Created: 2023-12-16T10:14:26.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-01T07:34:56.000Z (over 1 year ago)
- Last Synced: 2025-01-16T19:25:03.966Z (5 months ago)
- Topics: cmake, cpp, cpp20, data-structures, hash, hash-table, hashing
- Language: C++
- Homepage:
- Size: 38.1 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Hash-Table-in-CPP
A very simple hash table implementation in CPP,
## Very simple API
```cpp
ht_hash_table hash_table;
hash_table.insert("hello", "world");
hash_table.insert("hi", "Rishabh");
print("{}\n", hash_table.search("hi"));
hash_table.remove("hi");
```Written in modern CPP so no memory leaks, checked using Valgrind
## Credit
I wrote this while following [How to write a Hash Table](https://github.com/jamesroutley/write-a-hash-table).
it was written in C so for learning purpose I converted it to CPP, logic is same but i have changed the implementation
to an OOPS one, with classes and other modern CPP features like using standard string and others