Skip to content

bayesiandog/hashTable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Chain Hash Table Implementation

image

Description

Hash table implementation with separate chaining collision handling. This means that when a new key maps to an already used index of the table, the new value is also stored in that index.

This is achieved by using a linked list inside the hash table structure and simply adding nodes to each index whenever a collision occurs.

The user can retrieve or delete any node on any index.

Example

Create new hash table

ht* htable = ht_create();

Create entry

ht_entry* entry = create_entry(key, value);

Insert entry

insert(entry, htable);

Retrieve entry

retrieve(htable, entry, v);

Delete entry

delete(htable, entry);

Run the test example in the main file to try it out.

About

Hash table implementation with separate chaining collision handling.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages