abdullahselek / hashtablecxx

Generic Hashtable implementation with C++.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hashtablecxx

Build Status Build status

Hashtable implementation with C++.

Building Repository

To build the repository you need CMake. You can download from here. 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<int, std::string, 4> hashTable;

Put a new value with key and value

hashtable.put(0, "zero");

Searching for a value with key

Node<int, std::string> *node = hashtable.search(0);

Removing a node with key

Node<int, std::string> *removedNode = hashTable.remove(0);

About

Generic Hashtable implementation with C++.

License:MIT License


Languages

Language:C++ 99.9%Language:CMake 0.1%