Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hash-Table-Using-Chaining

This program uses a hash function to decide where to place each element (emails in this case) in the array. Whenever collision occurs between different elements, they are placed in a linked list, pointed to by the key. The program also shows the number of collusions occured, inserting and search durations.

In this program, the following hash function is used:

image

where s is an array of characters in an email, P is the prime number 67, m is the length of the email, and M is the table size.

The number 67 was chosen as our prime number to reduce collisions. Although it is closer to a power of 2 compared to other prime numbers, experimentally, it produced far fewer collisions and better distribution with our dataset.

3 sets of randomized emails were used, A, B, and C,with sizes 100, 100000, and 500000, respectively The format is as follows. [A-Za-z0-9]{5}.[A-Za-z0-9]{5}@[A-Za-z]{5}.(com|net|org)

Set A:

image

Set B:

image

Set C:

image

Note: the targeted are randomly chosen from the specified set.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages