Skip to content

Nishantdd/hashtable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hash table in C

Hash tables are one of the most useful data structures. Their quick and scalable insert, search and delete make them relevant to a large number of computer science problems.

Collisions are handled using double hashing which is an open-addressing technique to resolve hash collisions without any need for external chaining.

Resizing technique is implemented so that the hashtable automatically allocates and de-allocates memory based on the load. If the load exceeds 70%, the capacity is doubled and if the load falls below 10%, the capacity is halved.

How to use?

1. Clone the repository

git clone https://github.com/Nishantdd/hashtable.git
cd hashtable

2. Install 'make' on your environment

  • Windows: choco install make
  • MacOS: brew install make
  • Linux: Most probably already installed. If not, install through your package manager.

3. Compile and Run

Note

Make sure that gcc (GNU Compiler Collection) is installed.

If you wish to use any other compiler (clang or cl), please update the CC variable in Makefile accordingly

make # For building
make run # For executing the binary

For cleaning the build output

make clean

About

A hashtable written in C

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published