Welcome to AssignmentCache!

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

Availability: In stock

$5.00

Quick Overview

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)

DAT305 Week 3 Challenge Activity 1 Hash tables with modulo hash function

Double click on above image to view full picture

Zoom Out
Zoom In

More Views

  • DAT305 Week 3 Challenge Activity 1 Hash tables with modulo hash function
  • DAT305 Week 3 Challenge Activity 2 Hash tables with modulo hash function
  • DAT305 Week 3 Challenge Activity 3 Hash tables with modulo hash function
$5.00

Details

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)

Additional Information

Special Price $3.00

Product Tags

Use spaces to separate tags. Use single quotes (') for phrases.

[profiler]
Memory usage: real: 18350080, emalloc: 18014120
Code ProfilerTimeCntEmallocRealMem