DAT/305 Week 3 Challenge Activities 3.6.1: Hash tables with modulo hash function
CHALLENGE ACTIVITY 1
A hash table with non-negative integer keys has a modulo hash function of key % 20.
Hash function index range: 0 to
Item 128 will go in bucket
CHALLENGE ACTIVITY 2
An ordinary array contains items with keys: 30, 22, 6, 34, 2, 10,13
A hash table has 15 buckets with hash function key % 15.
The hash table contains the same items as the array.
How many elements are checked when searching for each of the following items?
CHALLENGE ACTIVITY 3
An empty hash table hashTable has 5 buckets and a hash function of key % 5.
The following operations are performed in order.
Select which operations cause a collision.
Hashinsert(hash Table, 2)
Hashinsert(hash Table, 15)
There are no reviews yet.