Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Custom Hash Map data structure implementation

An ASCII representation of the structure

[INDEX]      [BUCKET ARRAY]          [LINKED LIST NODES]

 0       |      •-------|------> [ Key: "Apple" | Val: 5 ] -> [ Key: "Grape" | Val: 2 ] -> NULL
         |              |
 1       |    EMPTY     |
         |              |
 2       |      •-------|------> [ Key: "Banana" | Val: 12 ] -> NULL
         |              |
 3       |      •-------|------> [ Key: "Pear" | Val: 8 ] -> [ Key: "Mango" | Val: 3 ] -> NULL
         |              |
 4       |    EMPTY     |

Performance Time Complexity

Average Case: $O(1)$ for insertions, deletions, and lookups.Worst Case: $O(n)$ if the hash function distributes keys poorly, causing all entries to collide into a single linked list.

About

My custom implementation of the Hash Map data structure. It also features custom Linked Lists that accommodate for more efficient extraction of data than the built-in arrays.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages