Hash Table Data Structure
Hash Table Data Structure
STRUCTURE
INTORUCTION
criteria below;
1) Function should be easy and quick to
compare
2) Minimum
BY:OFONDO SMITH number of collision it may cause
11/22/2024
Types of hash function
8
11/22/2024
Types of hash function
10
Folding methods
Here keys are partitioned in to parts and the each
part are added together
technology.
BY:OFONDO SMITH 11/22/2024
Collision In Hash Table…………con’d
13
open addressing
Double Hashing,
Quadratic Probing.
16
Double Hashing:
Double hashing is a collision resolution technique used
Linear Probing:
This involves doing a linear probe for the following slot
19
20
Quadratic Probing:
Quadratic probing is an open addressing scheme where we look for the i2‘th slot in the i’th iteration if
Steps:
3. If hash table [h(k)] is empty, insert the key and stop else the space is occupied ,we must
i. Increase i by 1
ii. Compute the new has value, h(k) = (k + i^2) % size of the table
5. stop
11/22/2024
Work example on Quadratic Probing
21
29
30
fill up.