Skip to content

abdullahselek/hashtablecxx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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++.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published