DAT/305 Week 3 Challenge Activities 3.6.1: Hash tables with modulo hash function

$ 5

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.

999 in stock

SKU: DAT305WK3C3P6 Category:

Description

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(hashTable, 12)
Hashinsert(hashTable, 0)
Hashinsert(hashTable, 5)
Hashinsert(hash Table, 15)

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

You may also like…