Linear Probing, Double Hashing & Quadratic Probing
Prince Joshua Ngojo BSCS-2
Show/Hide About Hashing
About Hashing:
Hashing is a technique to map data of arbitrary size to fixed-size values. In this simulation, you can choose between:
Linear Probing:hash(value) = value % SIZE â If a collision occurs, move to the next cell.
Double Hashing:hash2(value) = 1 + (value % (SIZE-1)) â If a collision occurs, move by a step size given by a second hash function.
Quadratic Probing:hash(value, i) = (hash(value) + i2) % SIZE â If a collision occurs, move by i2 steps.
Insert: Value is placed at the index given by the hash. If occupied, the chosen collision method is used. Search: The table is probed using the chosen method until the value is found or an empty cell is reached. Delete: The value is searched and removed if found.
Instructions:
Enter a value and select a collision method.
Click Insert to add the value to the table.
Click Search to find a value in the table.
Click Delete to remove a value from the table.
Use the step controls (Prev, Next, Auto, Stop) to animate each operation step-by-step.
See the Probing Sequence and Statistics panels for detailed feedback.