https://github.com/abdullahselek/hashtablecxx
Generic Hashtable implementation with C++.
https://github.com/abdullahselek/hashtablecxx
cpp generic hashtable library
Last synced: about 1 year ago
JSON representation
Generic Hashtable implementation with C++.
- Host: GitHub
- URL: https://github.com/abdullahselek/hashtablecxx
- Owner: abdullahselek
- License: mit
- Created: 2017-06-03T08:44:59.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-06-05T18:32:53.000Z (about 9 years ago)
- Last Synced: 2024-12-26T23:26:33.315Z (over 1 year ago)
- Topics: cpp, generic, hashtable, library
- Language: C++
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# hashtablecxx
[](https://travis-ci.org/abdullahselek/hashtablecxx)
[](https://ci.appveyor.com/project/abdullahselek/hashtablecxx)
Hashtable implementation with C++.
## Building Repository
To build the repository you need CMake. You can download from [here](https://cmake.org/download/).
You can create a shortcut ```cmake``` command for macOS as below
```
sudo mkdir -p /usr/local/bin
sudo /Applications/CMake.app/Contents/bin/cmake-gui --install=/usr/local/bin
```
After cloning repository to your own local machine go to project root folder and run
```
cmake .
```
and then
```
cmake --build .
```
to run unit tests for UNIX machines
```
cd test
./tests
```
and for Windows machines
```
cd test/Debug/
tests.exe
```
## Sample Usage
Instantiate hashtable as below with your custom size and custom value
```
HashTable hashTable;
```
Put a new value with key and value
```
hashtable.put(0, "zero");
```
Searching for a value with key
```
Node *node = hashtable.search(0);
```
Removing a node with key
```
Node *removedNode = hashTable.remove(0);
```