Skip to content

Optimized implementations of different hashing algorithms - Linear probing, Quadratic probing, Chained hashing, Cuckoo hashing

Notifications You must be signed in to change notification settings

s4ndhyac/Hashing-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hashing-Algorithms

Optimized implementations of different hashing algorithms - Linear probing, Double hashing, Chained hashing, Cuckoo hashing

The 4 hashing algorithms – Linear Probing, Chained Hashing, Cuckoo Hashing and Quadratic Probing have been implemented in the JAVA programming language.

All hashing algorithms implement the IHashingAlgorithm interface which include 4 methods – set, search, delete and hash.

The Entry class defines the structure of the object that is used for operations on the hashtable. It has two data members – an Integer key and an Integer value.

Build instructions:

  • cd into the folder src/hashingAlgorithms

  • Compile the files using the command: javac *.java

  • To test the hashing algorithms use the following commands:

    java Main dataPoints intervalSize numTrials hashingAlgorithm

For example:

java Main 100 1000 100 1

java Main 10 10 100 2

where,

  • dataPoints – No. of input sizes to run the algorithm for
  • intervalSize – The step by which the input size increases
  • numTrials – All operations are averaged over a no. of trials
  • hashingAlgorithm ->
    1 – Chained Hashing
    2 – Linear Probing
    3 – Quadratic Probing
    4 – Cuckoo Hashing

About

Optimized implementations of different hashing algorithms - Linear probing, Quadratic probing, Chained hashing, Cuckoo hashing

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages